+ Reply to Thread
Results 1 to 11 of 11

Consolidate Text from Various Sheets in Same Workbook

  1. #1
    Registered User
    Join Date
    06-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Consolidate Text from Various Sheets in Same Workbook

    Hi,

    I would like to combine lists of data from multiple worksheets into one master summary sheet.
    It's one column of data from each sheet (col. heading = "id reference"). There may be multiple instances where the same id reference is in 2 or more sheets, but I want each instance to be copied, not just the one.
    The ID references are sometimes alphanumeric and sometimes numeric only - I just want a list of everything in my summary sheet.

    This is to be done on a weekly basis and the amount of data varies each week.
    I've tried using the Consolidate function but it doesn't seem to work as I'm asked to select a function (eg. Sum) but I simply want to display the data in one long list!

    EG:
    Sheet 1:
    abc123
    wer123
    ert2342
    4567323

    Sheet 2:
    abc123
    rtyhe35
    w5235
    k63g
    rjhet5

    Master Summary should then show all the above in on col:
    abc123
    wer123
    ert2342
    4567323
    abc123
    rtyhe35
    w5235
    k63g
    rjhet5

    Is this even possible, and if so, please help!!

    Thanks,
    L

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Consolidate Text from Various Sheets in Same Workbook

    Yes, do you need the sheetname to appear alongside each data set?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    06-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Consolidate Text from Various Sheets in Same Workbook

    No, it doesn't need to be there.
    Thank you.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Consolidate Text from Various Sheets in Same Workbook

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button

  5. #5
    Registered User
    Join Date
    06-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Consolidate Text from Various Sheets in Same Workbook

    Thanks for that. I forgot to mention, the position of the column is different in each sheet. There are about 5 sheets I need to copy from, in one the id ref is in col B, in another it's in B etc.
    Will the code still work?

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Consolidate Text from Various Sheets in Same Workbook

    No, i fear not.

    Is the column that needs consolidating the only column in your sheets?

  7. #7
    Registered User
    Join Date
    06-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Consolidate Text from Various Sheets in Same Workbook

    Also, is there a non VBA way to do it? I would prefer if it wasn't VBA :$ (sorry)
    The summary sheet has other bits of data in it that I can't amend at the moment, I need the list of copied data from A3 downwards.

  8. #8
    Registered User
    Join Date
    06-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Consolidate Text from Various Sheets in Same Workbook

    Arlette- no it is not. There are other columns of data in the summary sheet that I'm not supposed to amend!!

  9. #9
    Registered User
    Join Date
    06-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Consolidate Text from Various Sheets in Same Workbook

    There are also other columns in each of the sheets that I need to copy the data from. All contain different pieces of information in different formats!
    (just to make it interesting!!)

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,730

    Re: Consolidate Text from Various Sheets in Same Workbook

    Post an example workbook so that we can see what variations you have.

    Pete

  11. #11
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Consolidate Text from Various Sheets in Same Workbook

    Hi lanos,

    Give this a try.

    Firstly define a dynamic range for each sheet's column you need to copy. Assuming there are NO blank cells in the range. Here is a tutorial about defining dynamic range.

    Consider these are the named ranges. Name1, Name2, Name3, Name4, Name5 (total 5 sheets)

    Then in summary insert two rows above row 1, then in

    A1:0
    B1: =COUNTA(Name1)
    C1: =COUNTA(Name2)
    D1: =COUNTA(Name3)
    E1: =COUNTA(Name4)
    F1: =COUNTA(Name5)

    A2: =SUM($A1:A1) then copy across to F2

    Then in A5, and copy down as needed.

    Please Login or Register  to view this content.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

+ 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