메인 컨텐츠로 가기

Excel에서 이전 워크 시트의 값을 사용 / 참조하는 방법은 무엇입니까?

Excel에서 복사본을 만들 때 이전 워크 시트의 특정 셀 값을 참조하는 방법은 무엇입니까? 예를 들어 Sheet2의 복사본을 만들 때 Sheet1의 A2 셀을 새로 복사 된 워크 시트 (예 : Sheet3)에 자동으로 참조 할 수 있습니다. 그것을 달성하는 방법? 이 기사가 도움이 될 것입니다.

사용자 정의 함수가있는 이전 워크 시트의 사용 / 참조 값
Excel 용 Kutools에서 이전 워크 시트의 값 사용 / 참조


사용자 정의 함수가있는 이전 워크 시트의 사용 / 참조 값

솔직히 말해 워크 시트 사본을 만들 때 특정 셀 값을 자동으로 참조 할 수있는 방법은 없습니다. 실제로 새 시트를 만든 다음 다음 사용자 정의 함수를 사용하여 이전 워크 시트의 셀 값을 참조 할 수 있습니다.

1. 새로운 빈 워크 시트 (Sheet3)를 만든 후 다른 + F11 열려면 동시에 키 응용 프로그램 용 Microsoft Visual Basic 창.

2. 에서 응용 프로그램 용 Microsoft Visual Basic 창을 클릭합니다 끼워 넣다 > 모듈. 그런 다음 다음 VBA 코드를 복사하여 코드 창에 붙여 넣습니다.

VBA : Excel에서 이전 워크 시트의 값 사용 / 참조

Function PrevSheet(RCell As Range)
    Dim xIndex As Long
    Application.Volatile
    xIndex = RCell.Worksheet.Index
    If xIndex > 1 Then _
        PrevSheet = Worksheets(xIndex - 1).Range(RCell.Address)
End Function

3. 누르세요 다른 + Q 키를 동시에 닫아 응용 프로그램 용 Microsoft Visual Basic 창.

4. Sheet3의 빈 셀 (예 : A1)을 선택하고 수식을 입력합니다. = PrevSheet (A1)수식 표시 줄 다음을 누릅니다. 엔터 버튼 키.

이제 현재 워크 시트에서 이전 워크 시트 (Sheet1)의 A2 셀 값을 얻을 수 있습니다.

주의 사항: 코드는 현재 워크 시트의 이전 워크 시트에 속하는 워크 시트를 자동으로 식별합니다.


Excel 용 Kutools에서 이전 워크 시트의 값 사용 / 참조

와 더불어 동적으로 워크 시트 참조 ~의 유용성 Excel 용 Kutools, Excel에서 이전 워크 시트의 값을 쉽게 사용하거나 참조 할 수 있습니다.

신청하기 전에 Excel 용 Kutools, 제발 먼저 다운로드하여 설치하십시오..

1. 이전 워크 시트에서 현재 워크 시트로 셀 A1의 값을 참조하려면 현재 워크 시트에서 셀 A1을 선택한 다음 클릭하십시오. 쿠툴 > 더 보기 > 동적으로 워크 시트 참조. 스크린 샷보기 :

2. 에서 워크 시트 참조 채우기 대화 상자에서 이전 워크 시트 이름 만 확인하십시오. 워크 시트 목록 상자를 클릭 한 다음 채우기 범위 버튼을 클릭합니다.

그러면 이전 워크 시트의 A1 셀 값이 현재 워크 시트에서 참조되는 것을 볼 수 있습니다.

주의 사항:이 유틸리티를 사용하면 다른 워크 시트의 동일한 셀 값을 현재 워크 시트로 한 번에 참조 할 수 있습니다.

  이 유틸리티의 무료 평가판 (30 일)을 받으려면 그것을 다운로드하려면 클릭하십시오을 클릭 한 다음 위 단계에 따라 작업 적용으로 이동합니다.


Excel 용 Kutools에서 이전 워크 시트의 값 사용 / 참조

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (22)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, Your code works perfectly! The intent for me is to fill a column on one of the worksheets which would update a linear graph. My question is, how do I add the new number entered on a new worksheet, while still maintaining the numbers the same of the previous sheets. For example, I entered PrevSheet(A1) on Sheet 2, which takes the number for A1 cell from Sheet 1. So I went to cell A2 of Sheet 2, and entered PrevSheet(A1) again. The intent is if I copy and paste a new sheet (Let's call it Sheet N), and I update cell A1 in Sheet N with a different value, Sheet 2 will have the value from Sheet 1 in cell A1, and the Value from Sheet N in cell A1 in cell A2. But what happens is that is updates both cell A1 and A2 in Sheet 2 to the same values as in Sheet N. This makes sense because it's taking the values from the previous sheet. Hope I didn't confuse you. Thanks!
This comment was minimized by the moderator on the site
Hey.

I'm using Greek Office 365 with all updates installed, and I can't get this to work.

It returns name error at the cell I input =PrevSheet(A1).

Both sheets have the vba code and the file is saved as .xlsb

Any clues?
Thanks in advance :)
This comment was minimized by the moderator on the site
Hi Sotos,
You need to put the VBA in the Module (code) window (press the Alt + F11 keys to open the Visual Editor, click Insert > Module to add a new Module editor, and the enter the code). Then apply the formula.
This comment was minimized by the moderator on the site
THANK YOU VERY VERY MUCH! VERY HELPFUL!
This comment was minimized by the moderator on the site
Excellent!!! VBA code thanks a lot
This comment was minimized by the moderator on the site
Excellent I have used previous sheet function, but, if i do any additions of rows or columns in previous sheet, the values are getting change I want constant result. for example if i select =prevsheet(A6) where the value is there, but in the previous sheet if I add one row the value will go to A7, but in current sheet it is taking the value of A6 only, can u help me
This comment was minimized by the moderator on the site
I tried the code but it returns formulas not allowed. The cell of the previous worksheet is a result of a formula., how do you bypass the formula and return the result? The previous sheet cell returns the formula of =SUM(L38:L39)-L40
This comment was minimized by the moderator on the site
Hi RudyT,I tested it in the circumstance you mentioned, but I have no problem here. Which Excel version are you using?
This comment was minimized by the moderator on the site
Wow, that was 3 months ago, but surely appreciate the reply...

I don't know how to check Excel 365... The problem is I have a a value that I want to pass to new sheet, that must read, get value of previous sheet without naming it. Just get the previous sheet value. Your code passes the code of the previous sheet, and not the value. Because the value of the cell is a formula that gathers the totals from 2 other cells.
This comment was minimized by the moderator on the site
I followed steps 1-4, but I keep getting a #NAME error. Excel 2016. Please advise?
This comment was minimized by the moderator on the site
Hi Anon,
The code works well in my Excel 2016. Did you find specific error reminded in your code window when getting the #NAME error result?
This comment was minimized by the moderator on the site
I followed steps 1-4 but I keep returning a #NAME? error - Please advise?
This comment was minimized by the moderator on the site
Hi Andrew,
Which Office version do you use?
This comment was minimized by the moderator on the site
What about use value from Next Sheet?
This comment was minimized by the moderator on the site
Hi Alex,
To get the value from next Sheet, please replace the minus sign with plus sign in the sixh line of the code:
PrevSheet = Worksheets(xIndex + 1).Range(RCell.Address)
This comment was minimized by the moderator on the site
Hi Crystal, I tried replacing the minus sign with a plus sign but it didn't work - the relevant cell just returned a zero. I'm just wanting the change(s) required to do exactly as above BUT with the workbook numbering going from right to left, ie. Sheet3, Sheet 2, Sheet1 (the previous sheet will be the one to the right). Thanks
This comment was minimized by the moderator on the site
Hi Mav,
The method works based on the worksheets' order in your workbook. ie. The worksheets order from left to right are Sheet3, Sheet2 and Sheet1. For Sheet2, it's previous worksheet is Sheet3, and it's next worksheet is Sheet1.
This comment was minimized by the moderator on the site
Hi Crystal,
Yes I know. My query (like Alex's) is what change is required to make it work the other way, ie, for the next sheet, where the next sheet is to the left of the preceding sheet? You wrote to Alex,
"please replace the minus sign with plus sign in the sixh line of the code:
PrevSheet = Worksheets(xIndex + 1).Range(RCell.Address)".
My comment was just to say that that particular change did not work and to ask if you have a way that will actually work.
This comment was minimized by the moderator on the site
I've been looking for something to do this forever, thank you so much you have no idea. I have a simple spreadsheet for data entry weekly and a new tab for each week. the days, date, week #, etc goes +1 and then it grabs from previous sheet and moves to new one, this created a fast solution to data transfering to different sheets--- Again thank you
This comment was minimized by the moderator on the site
Good Day,
Sorry I can’t help with this, you can post your question in our forum: https://www.extendoffice.com/forum.html to get more Excel supports from our professional.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations