PC Review


Reply
Thread Tools Rate Thread

CONSOLIDATE DATA FROM MULTIPLE SHEETS IN ONE

 
 
Sinner
Guest
Posts: n/a
 
      10th Apr 2008
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.
 
Reply With Quote
 
 
 
 
SCrowley
Guest
Posts: n/a
 
      10th Apr 2008
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.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Consolidate Excel Data from multiple sheets into one rodw Microsoft Excel Worksheet Functions 1 2nd Apr 2009 08:03 PM
Re: Consolidate many sheets into one sheet with multiple rows Ron de Bruin Microsoft Excel Programming 0 6th Dec 2006 09:19 PM
Consolidate data from multiple sheets =?Utf-8?B?QmRhdmlz?= Microsoft Excel Worksheet Functions 0 26th Sep 2006 04:25 PM
get distinct data from multiple sheets & then consolidate distinct =?Utf-8?B?TmlraGls?= Microsoft Excel Programming 1 18th Sep 2006 07:01 PM
how do i use import to consolidate data from multiple sheets =?Utf-8?B?TmF2ZWVu?= Microsoft Excel Worksheet Functions 1 14th Apr 2006 12:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:35 AM.