Appending values from different sheets

beklein

New Member
Joined
Nov 12, 2018
Messages
6
Hi all,

I feel like I have a question that should not be too difficult to solve, but I just can't figure it out.

I have multiple sheets with identical layouts, I wish to append this values in one total sheets. No sums or anything has to be done, just clear and simple append the values in different cells underneath eachother.

Lets for example say I have one sheet with values in column A:
Bob
John
Sarah

and another sheet with values in column A:
Lisa
Henry
Mary

I want the total tab to show me:
Bob
John
Sarah
Lisa
Henry
Mary

Obviously my real sheet is a bit more extensive, but if I can get the values appended I think I can figure it out.

Anyone has an idea how to do something like this?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
This macro assumes you have a sheet named "Total" and that your data starts in row 2.
Code:
Sub CopyData()
    Application.ScreenUpdating = False
    Dim LastRow As Long, ws As Worksheet
    For Each ws In Sheets
        If ws.Name <> "Total" Then
            LastRow = ws.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
            Range("A2:A" & LastRow).Copy Sheets("Total").Cells(Sheets("Total").Rows.Count, "A").End(xlUp).Offset(1, 0)
        End If
    Next ws
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Thanks! Didnt expect to need a macro for this. Gonna figure out if there's another setup possible else I'll work with this, thanks for your help!
 
Upvote 0
vba is an option only
also you can try PowerQuery
Code:
[SIZE=1]let
    Source = Table.Combine({shtA, shtB, shtC}),
    merge = Table.CombineColumns(Source,{"Sht1", "sht2", "sht3"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"sht")
in
    merge[/SIZE]

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]Sht1[/td][td][/td][td=bgcolor:#70AD47]sht[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]Bob[/td][td][/td][td=bgcolor:#E2EFDA]Bob[/td][/tr]

[tr=bgcolor:#FFFFFF][td]John[/td][td][/td][td]John[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]Sarah[/td][td][/td][td=bgcolor:#E2EFDA]Sarah[/td][/tr]

[tr=bgcolor:#FFFFFF][td][/td][td][/td][td]Lisa[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]sht2[/td][td][/td][td=bgcolor:#E2EFDA]Henry[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]Lisa[/td][td][/td][td]Mary[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Henry[/td][td][/td][td=bgcolor:#E2EFDA]Bob[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]Mary[/td][td][/td][td]John[/td][/tr]

[tr=bgcolor:#FFFFFF][td][/td][td][/td][td=bgcolor:#E2EFDA]Sarah[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]sht3[/td][td][/td][td]Lisa[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]Bob[/td][td][/td][td=bgcolor:#E2EFDA]Henry[/td][/tr]

[tr=bgcolor:#FFFFFF][td]John[/td][td][/td][td]Mary[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]Sarah[/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]Lisa[/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]Henry[/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]Mary[/td][td][/td][td][/td][/tr]
[/table]
 
Upvote 0
Didn't think of that as well, thanks! Guess I assumed this shouldn't be too complicated using regular Excel expressions, but I wa wrong ;) Gonna look into this as well, thanks :)
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top