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.

Use/reference value from previous worksheet with User-defined function
Use/reference value from previous worksheet with Kutools for Excel


Use/reference value from previous worksheet with User-defined function

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.


Use/reference value from previous worksheet with Kutools for Excel

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.

  If you want to have a free trial ( 30-day) of this utility, please click to download it, and then go to apply the operation according above steps.


Use/reference value from previous worksheet with Kutools for Excel


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

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!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    srinath · 4 months ago
    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
  • To post as a guest, your comment is unpublished.
    RudyT · 9 months ago
    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
    • To post as a guest, your comment is unpublished.
      crystal · 6 months ago
      Hi RudyT,
      I tested it in the circumstance you mentioned, but I have no problem here. Which Excel version are you using?
      • To post as a guest, your comment is unpublished.
        rudyT · 6 months ago
        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.


  • To post as a guest, your comment is unpublished.
    Anon · 1 years ago
    I followed steps 1-4, but I keep getting a #NAME error. Excel 2016. Please advise?
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      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?
  • To post as a guest, your comment is unpublished.
    Andrew · 1 years ago
    I followed steps 1-4 but I keep returning a #NAME? error - Please advise?
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Hi Andrew,
      Which Office version do you use?
  • To post as a guest, your comment is unpublished.
    Alex · 1 years ago
    What about use value from Next Sheet?
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      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)
      • To post as a guest, your comment is unpublished.
        Mav · 1 years ago
        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
        • To post as a guest, your comment is unpublished.
          crystal · 1 years ago
          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.
          • To post as a guest, your comment is unpublished.
            Mav · 1 years ago
            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.
  • To post as a guest, your comment is unpublished.
    Ryan · 2 years ago
    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
    • To post as a guest, your comment is unpublished.
      crystal · 2 years ago
      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.
  • To post as a guest, your comment is unpublished.
    Steve Bannister · 3 years ago
    Excellent work and explanation. Saved me so much time, thank you VERY much.
  • To post as a guest, your comment is unpublished.
    NC · 3 years ago
    Hello
    I have a question for the experts.
    I am able to make a reference to previous sheet.
    But i would like to keep repeating that reference throughout the workbook on the same cell on the next sheets. (ie D13)
    Example:
    Sheet 1 Cell D13 is repeated in the next sheets with 1 incremental value each.
    However if i delete sheet 7 or any other sheet, i need excel to continue counting the same way.

    for example

    sheet 1 I start with 100
    sheet 20, I end up with 119
    if i delete couple sheets , i want to make sure that references change automatically without manual intervention.
    Meaning that reference on D13 is changed automatically after I delete sheets.
    Thank you for your help.