+ Reply to Thread
Results 1 to 11 of 11

Copy cell value between two worksheets and paste in column of another worksheet

  1. #1
    Registered User
    Join Date
    11-22-2011
    Location
    Davis,USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Copy cell value between two worksheets and paste in column of another worksheet

    Dear Forum,
    I am using Excel 2010.
    I have a workbook with several worksheets that are between the Worksheet "Start" and the Worksheet "End".
    All the worksheets in between have similar arrangement, so that in the Worksheet named "Statistics" (which is not in between the two mentioned worksheets), there are statistics formulas, such as: = AVERAGE(Start:End!K2).

    I would like a formula in worksheet Statistics that will copy the cell values of cells H72 in worksheets between Start:End and paste them in Column AC, starting in lets say Cell AC1, and continue below.

    I would like to use this formula in several other workbooks that have similar arrangement.
    The number of worksheets betwee Start:End varies and all their names are different as well.
    Hope it can be done with a formula, instead of vba.

    I found in the forum a worksheet with the formula that uses INDEX and MATCH, looks at Sheet2, finds a name and copies its valuein Sheet1. I am sorry I can't find again the post where I found this Excel doc in the forum.

    Their formula is: =INDEX(START:END!$B$2:$B$10,MATCH(COMPILATION!A2,START:END!$A$2:$A$10,0)) and they copied it and pasted to cells below.

    I tried to adapt it: =INDEX(START:END!$B$2:$B$10,MATCH(Statistics!A2,START:END!$A$2:$A$10,0))
    but I get error: #VALUE

    Maybe this is not the right path to solve it.

    I have attached their worksheet with their example in Sheet1 and 2, and what I tried in the Statistics Worksheet and Start and End.


    If someone could help me or direct me to the right path I will appreciate it very much

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Copy cell value between two worksheets and paste in column of another worksheet

    your "their" formula is
    =INDEX(Sheet2!$B$2:$B$10,MATCH(Sheet1!A2,Sheet2!$A$2:$A$10,0))

    and to be honest even if it included start:end i cant see how a 3d index match would work like that
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    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
    53,044

    Re: Copy cell value between two worksheets and paste in column of another worksheet

    if all your data on each sheet is in the same sequence, try the attached...
    Attached Files Attached Files
    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

  4. #4
    Registered User
    Join Date
    11-22-2011
    Location
    Davis,USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Red face Re: Copy cell value between two worksheets and paste in column of another worksheet

    Hi FDibbins and Martindwilson,


    I think I used/applied the example wrong. Sorry for this. I actually wanted a formula that will copy the value that is in one cell, let's say Cell C5, from all the worksheets that are between the worksheet Start and End and paste them in a Compilation worksheet (in the same workbook).

    I managed to use a vba (I didn't want to use this) that will write the Names of the worksheets in Compilation worksheet, Cell B2 and below, and then I combined the results with function =INDIRECT in the adjacent column that gives values from t cells C5.

    I used:

    =INDIRECT("'"&B2&"'!C5")

    What I noticed is that every time I go back to the Compilation worksheet, the vba automatically adds the names of the worksheets below again (they get duplicated).

    If someone could help me use a formula, that would be great. Or if I could get advice on how to stop the vba from running every time I access the worksheet, please help.


    I don't know if I can just copy the vba and paste it here so everybody can see it (I am new at the forum). Otherwise, it is in the attached file .xlsm

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy cell value between two worksheets and paste in column of another worksheet

    Below the VBA code your using.

    Maybe it's easier for the forum helpers.

    I suppose it's in the line of "private sub".

    On the other hand i'm a VBA noob so rely on the answers of the college-forummembers

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy cell value between two worksheets and paste in column of another worksheet

    And if you wish the answers of all individual sheets, on the statistics sheet, you can use the system of the added file.

    the blue cells are handly added.

    the yellow cells contains a formula.

    the cells in row 1 are dynamic (you can copy them to the right).

    Please reply if this helped you.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-22-2011
    Location
    Davis,USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy cell value between two worksheets and paste in column of another worksheet

    Hi Oeldere,

    I actually needed a formula that will write all of Jacks’ values below his name, let’s say below D1. Then all of Bobs’ below E1, and so on. I didn’t do a right table in the first place. My mistake.

    And having names of worksheets in a column, that would be a bonus.

    The Number and Names of sheets between Start and End vary. I tested your formula, but if I change the name of a worksheet, it shows “#REF!”.

    I have several workbooks that I would like to just copy paste the formulas.

    Honestly I don’t know how to solve this; if it is feasible without vba. I have attached a table with better clarification.


    Thanks a million!

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy cell value between two worksheets and paste in column of another worksheet

    Same list with other names (in table).

    For your question i will look later on.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy cell value between two worksheets and paste in column of another worksheet

    And the way your asking for.

    Do you have questions, just ask.

  10. #10
    Registered User
    Join Date
    11-22-2011
    Location
    Davis,USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy cell value between two worksheets and paste in column of another worksheet

    This is perfect, Oeldere, thank you very, very much!!
    Have a great day!

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy cell value between two worksheets and paste in column of another worksheet

    Glad i could help you.

    Thanks for the reply.

    Please mark your questions as solved.

+ 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