About automatic population?

aswag74

New Member
Joined
Sep 14, 2006
Messages
4
Not even sure if that is the correct verbage. Realtively new to XL. I searched for some answers/threads, but I think I was using the wrong words.

Simple simple dumb question, I am sure.

I receive a spread sheet from a vendor that is broken down into 5 cities/sheets inside a work book.

Lets say column A, in all sheets, is INVOICE NUMBER.

How do I create a sheet at the end of the workbook that takes the info from all cloumn A's in all five sheets and makes one long column A with all the Invoice numbers?

Ignorantly,

Liberal Arts Major
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi, aswag74
Welcome to the Board !!!!!

perhaps a search for "consolidate" will provide you more useful links

one of many routes to go
Code:
Option Explicit

Sub consolidate()
'Erik Van Geit
'060914

Dim cnt As Integer
Dim I As Integer
Dim LR1 As Long
Dim LR2 As Long
cnt = Sheets.Count

Sheets.Add after:=Sheets(cnt)

        For I = 1 To cnt
            With Sheets(I)
            LR1 = .Cells(Rows.Count, "A").End(xlUp).Row
            LR2 = Sheets(cnt + 1).Cells(Rows.Count, "A").End(xlUp).Row
            .Range("A1:A" & LR1).Copy Sheets(cnt + 1).Range("A" & LR2 + 1)
            End With
        Next I

End Sub
kind regards,
Erik
possibly without internet-connection within 2 hours till 22th sept
 
Upvote 0

Forum statistics

Threads
1,215,831
Messages
6,127,139
Members
449,361
Latest member
VBquery757

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