• Autofilling cells with data from another sheet (2002 SP2)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Autofilling cells with data from another sheet (2002 SP2)

    • This topic has 7 replies, 4 voices, and was last updated 19 years ago.
    Author
    Topic
    #433066

    I have a workbook with two sheets. Sheet 1 contains data in rows. Sheet 2 displays a subset of the data in sheet 1 (along with other stuff manually entered, plus stuff from elsewhere).

    What I want is to enter a reference to the contents of cell x,y in sheet 1 into a cell in sheet 2 (i.e. =sheet1!x,y), and have the next three cells to the right in sheet 2 auto-fill with the contents of three other (always the same offset to the right) cells in the same row in sheet 1.

    Should be simple, probably is, but I can’t figure it out

    Viewing 1 reply thread
    Author
    Replies
    • #1017400

      One way is to use formulas like this in, say. cell D3

      =IF(A3=””, “”, VLOOKUP(A3, Sheet1!$A$1:$H$100, 4, FALSE))

      This formula says: look up the value from the cell in column A in the same row (if not empty), in first column of the range A1:H100 in Sheet1, and return the corresponding value from the 4th column.

      • #1017434

        Hans, that does it exactly as I want – thanks very much indeed.

        • #1017447

          Be aware that, for Hans’ formula to work, the values in column A must be unique. If there are duplicate values, Hans’ formula will always find and return the first one.

      • #1017887

        OK, I started using this and it works great. However…as I create versions of this workbook, I find that the references to Sheet1 remain pointing to the original workbook (V10 for the sake of argument) as opposed to the current one (say V12). How do I make the sheet reference keep pointing to sheet1 in the current workbook?

        • #1017889

          It depends on the way you create a new version. If you duplicate the workbook (the .xls file), or use File | Save As to create a copy, or if you copy both worksheets to a new workbook (in one go), the formulas should refer to Sheet1 in the current workbook. However, if you copy the worksheet with the formulas to a new workbook by itself, without copying Sheet1 at the same time, the formulas will refer to Sheet1 in the original workbook.
          If this doesn’t solve your problem, please post back.

    • #1017406

      You could use (if you start in A1 on Sheet2):

      =OFFSET(Sheet1!$A$1,ROW()-1,COLUMN()-1)

      Adjust the “1” in the rows and columns to match the startting row and column of the formula.

      Steve

      • #1017435

        Steve, thanks. Hans’ solution works better for my particular needs, but I appreciate your help.

    Viewing 1 reply thread
    Reply To: Autofilling cells with data from another sheet (2002 SP2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: