ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CONSOLIDATE DATA FROM MULTIPLE SHEETS IN ONE (https://www.excelbanter.com/excel-programming/409113-consolidate-data-multiple-sheets-one.html)

Sinner

CONSOLIDATE DATA FROM MULTIPLE SHEETS IN ONE
 
Hi,

After I import multiple text files in excel in seperate sheets in same
workbook, I want to consolidate them in one sheet. First row of each
sheet has same headers so during data merge it should not get first
row of sheet2, sheet3, sheet4.

I want to run this macro seperately from first macro i.e. import text
files so that I can first check all sheets for proper data integrity
manually.

Any help would be appreciated.

SCrowley

CONSOLIDATE DATA FROM MULTIPLE SHEETS IN ONE
 
I created a sheet called Combined Sheets, cell A2 and clicked on Macros and
ran this one. It combines the A2 cells in sheets 1, 2, and 3. Fills formula
Down to (row 285), copies all cells highlighted and pastes just the values.
Hopes this helps.

Sub combineall()
'
' combineall Macro
'

'
ActiveCell.FormulaR1C1 = "=Sheet1!RC&"" ""&Sheet2!RC&"" ""&Sheet3!RC"
Range("A2").Select
Selection.AutoFill Destination:=Range("A2:A285"), Type:=xlFillDefault
Range("A2:A285").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub

--
Thank you,

scrowley(AT)littleonline.com


"Sinner" wrote:

Hi,

After I import multiple text files in excel in seperate sheets in same
workbook, I want to consolidate them in one sheet. First row of each
sheet has same headers so during data merge it should not get first
row of sheet2, sheet3, sheet4.

I want to run this macro seperately from first macro i.e. import text
files so that I can first check all sheets for proper data integrity
manually.

Any help would be appreciated.



All times are GMT +1. The time now is 03:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com