+ Reply to Thread
Results 1 to 10 of 10

How do I copy the same cell from several worksheets into a column on a summary worksheet

  1. #1
    Registered User
    Join Date
    07-05-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    How do I copy the same cell from several worksheets into a column on a summary worksheet

    Hi,
    I have about 50-60 worksheets with data and formulas. I need a summary spreadsheet that will list in a column the name of each sheet (I found a macro that works for this part) and the values from cell A2 and O2 from all sheets.
    Please help!
    Thank you,
    Nico

  2. #2
    Registered User
    Join Date
    11-27-2012
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: How do I copy the same cell from several worksheets into a column on a summary workshe

    Can you post a sample workbook?

  3. #3
    Registered User
    Join Date
    07-05-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do I copy the same cell from several worksheets into a column on a summary workshe

    Here is a sample file. I actually have 50-60 sheets and it is very time consuming to do it by hand.
    I did not use the macro that lists the spreadsheet names as I was hoping we can do it all in the same code.
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: How do I copy the same cell from several worksheets into a column on a summary workshe

    Hi and welcome to the forum

    Based on the sample file you supplied, copy this down and across....

    =INDIRECT($A2&"!"&CHAR(64+COLUMN(A$1))&2)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    07-05-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do I copy the same cell from several worksheets into a column on a summary workshe

    Hi FDibbins,
    I tried the formula but it does not work. I get a Ref error. Where did u want me to paste it? And can u explain the formula to me?
    Thanks,
    Nico

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How do I copy the same cell from several worksheets into a column on a summary workshe

    Try the attached.
    Attached Files Attached Files

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: How do I copy the same cell from several worksheets into a column on a summary workshe

    You put it in B2, and copy down and across

  8. #8
    Registered User
    Join Date
    07-05-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do I copy the same cell from several worksheets into a column on a summary workshe

    This works! Thank you so much!

  9. #9
    Registered User
    Join Date
    07-05-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do I copy the same cell from several worksheets into a column on a summary workshe

    FDbbins,
    The formula you gave me works as well but I don't understand it enough to make it work for the other columns besides B.
    Thank you!

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: How do I copy the same cell from several worksheets into a column on a summary workshe

    the breakdown of that formula...
    =INDIRECT($A2&"!"&CHAR(64+COLUMN(A$1))&2)

    is as follows...
    starting in the middle and working out,
    CHAR(number) will return a letter that is the ASCII equivalent of that number
    CHAR(64.........will return the character just before the letter A, - to make the formula work, I took the character before A, so I could add 1, and the copy/paste would work, and return A
    COLUMN(A$1) gives 1 as an answer, which I add to the above to make it 65, to give me 3.
    I used the COLUMN() function to incrementally advance the column. 64=A, 65=B, 66=C etc
    I then combine the column letter with 2 CHAR(64+COLUMN(A$1))&2) to give me A2, B2, C2 etc
    Finally I add in the sheet name from A2.
    All this gives me an answer of ="aff1!A2" but this is still text and cannot be used as a reference in a formula, so this is where INDIRECT() comes in
    INDIRECT() converts a text string into a reference that can be used in a formula
    =INDIRECT($A2&"!"&CHAR(64+COLUMN(A$1))&2)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1