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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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]

Sht1sht
BobBob
JohnJohn
SarahSarah
Lisa
sht2Henry
LisaMary
HenryBob
MaryJohn
Sarah
sht3Lisa
BobHenry
JohnMary
Sarah
Lisa
Henry
Mary
 
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,214,838
Messages
6,121,885
Members
449,057
Latest member
Moo4247

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