How to use/reference value from previous worksheet in Excel?
How to reference a specific cell value from previous worksheet when creating a copy in Excel? For example, when creating a copy of Sheet2, you may want to automatically reference cell A1 of Sheet2 into the new copied worksheet (says Sheet3). How to achieve it? This article will help you.
To be honest, no method can automatically reference certain cell value when creating a copy of a worksheet. Actually, you can create a new sheet and then reference the cell value from previous worksheet with the following user-defined function.
1. After creating a new blank worksheet (says Sheet3), please press Alt + F11 keys at the same time to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy and paste the following VBA code into the Code window.
VBA: Use/reference value from previous worksheet in 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. Press the Alt + Q keys simultaneously to close the Microsoft Visual Basic for Applications window.
4. Select a blank cell of Sheet3 (says A1), enter formula =PrevSheet(A1) into the Formula Bar and then press the Enter key.
Now you will get the A1 cell value of previous worksheet (Sheet2) in current worksheet.
Note: The code will auto identify the worksheet which belongs to the previous one of current worksheet.
With the Dynamically Refer to Worksheets utility of Kutools for Excel, you can easily use or reference value from previous worksheet in Excel.
Before applying Kutools for Excel, please download and install it firstly.
1. If you want to reference value of cell A1 from previous worksheet to current worksheet, please select cell A1 in current worksheet and then click Kutools > More > Dynamically Refer to Worksheets. See screenshot:
2. In the Fill Worksheets References dialog box, only check the previous worksheet name in the Worksheet list box, and then click the Fill Range button.
Then you can see the value of cell A1 in previous worksheet is referenced in current worksheet.
Note: With this utility, you can reference the same cell value from different worksheets into current worksheet at once.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!