PC Review


Reply
Thread Tools Rate Thread

Collating of data from 2 or more sheets into one sheet

 
 
=?Utf-8?B?UHJhc2hhbnRoIEtS?=
Guest
Posts: n/a
 
      23rd Aug 2007
Hi,

Currently, Iam doing a very tedious and time consuming job. Please help me
out on this.

I have a workbook having several worksheets like 50+ having the same layout
i.e., Heading1, Heading2, Heading3 .... and may add more with the same
headers in each sheet. The Headings starts from say B8:N8 and have some
headings having a drop down list to be picked up in each row beneath that
till row no. 200.

Each sheet is named differently. My requirement is that I need to collate
these information by copying and pasting in another sheet named "Total Data"
of all these 50+ sheets information one below the other (i.e., from sheet1:
Copy/Paste B9:N200 to Sheet "Total Data" and from sheet2: Copy/Paste B9:N200
to Sheet "Total Data" just below the data copied from sheet1....... and
likewise for all sheets in "Total Data". Secondly, I also want the name of
each sheet to be captured in Column A in the sheet "Total Data" accordingly.

Please note that the sheet "Total Data" has also got the same layout as that
of the other sheets.

Can you please help me out in creating a Macro to do this task.

Your timely help will be greatly appreciated.
Prashanth KR.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      23rd Aug 2007
Sub copyData()
Dim sh as Worksheet, sh1 as Worksheet
Dim r as Range, r1 as Range
set sh1= Worksheets("Total Data")
for each sh in worksheets
if lcase(sh.name) <> "total data" then
set r = sh.Range("A1").CurrentRegion
set r = r.offset(1,0).Resize(r.rows.count-1,1)
set r = Intersect(r.EntireRow,sh.Range("B:N"))
set r1 = sh1.Cells(rows.count,1).End(xlup)(2)
r.copy r1.offset(0,1)
r1.Resize(r.rows.count,1).Value = sh.Name
end if
Next
end sub

--
Regards,
Tom Ogilvy


"Prashanth KR" wrote:

> Hi,
>
> Currently, Iam doing a very tedious and time consuming job. Please help me
> out on this.
>
> I have a workbook having several worksheets like 50+ having the same layout
> i.e., Heading1, Heading2, Heading3 .... and may add more with the same
> headers in each sheet. The Headings starts from say B8:N8 and have some
> headings having a drop down list to be picked up in each row beneath that
> till row no. 200.
>
> Each sheet is named differently. My requirement is that I need to collate
> these information by copying and pasting in another sheet named "Total Data"
> of all these 50+ sheets information one below the other (i.e., from sheet1:
> Copy/Paste B9:N200 to Sheet "Total Data" and from sheet2: Copy/Paste B9:N200
> to Sheet "Total Data" just below the data copied from sheet1....... and
> likewise for all sheets in "Total Data". Secondly, I also want the name of
> each sheet to be captured in Column A in the sheet "Total Data" accordingly.
>
> Please note that the sheet "Total Data" has also got the same layout as that
> of the other sheets.
>
> Can you please help me out in creating a Macro to do this task.
>
> Your timely help will be greatly appreciated.
> Prashanth KR.
>

 
Reply With Quote
 
=?Utf-8?B?UHJhc2hhbnRoIEtS?=
Guest
Posts: n/a
 
      24th Aug 2007

Wow..... it worked like a miracle for me. Thanks a lot Tom.......

Similarly, this brings me to an other question, if you dont mind......

What in case if I have different Workbooks named differently as the name say
sheet1, sheet2 ..... having only one sheet containing the same data and
layout. ie., say 50+ workbook and I want to collate the same in another
workbook named "Total Data".

I would greatly appreciate for your time and effort.
Prashanth KR.


"Tom Ogilvy" wrote:

> Sub copyData()
> Dim sh as Worksheet, sh1 as Worksheet
> Dim r as Range, r1 as Range
> set sh1= Worksheets("Total Data")
> for each sh in worksheets
> if lcase(sh.name) <> "total data" then
> set r = sh.Range("A1").CurrentRegion
> set r = r.offset(1,0).Resize(r.rows.count-1,1)
> set r = Intersect(r.EntireRow,sh.Range("B:N"))
> set r1 = sh1.Cells(rows.count,1).End(xlup)(2)
> r.copy r1.offset(0,1)
> r1.Resize(r.rows.count,1).Value = sh.Name
> end if
> Next
> end sub
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Prashanth KR" wrote:
>
> > Hi,
> >
> > Currently, Iam doing a very tedious and time consuming job. Please help me
> > out on this.
> >
> > I have a workbook having several worksheets like 50+ having the same layout
> > i.e., Heading1, Heading2, Heading3 .... and may add more with the same
> > headers in each sheet. The Headings starts from say B8:N8 and have some
> > headings having a drop down list to be picked up in each row beneath that
> > till row no. 200.
> >
> > Each sheet is named differently. My requirement is that I need to collate
> > these information by copying and pasting in another sheet named "Total Data"
> > of all these 50+ sheets information one below the other (i.e., from sheet1:
> > Copy/Paste B9:N200 to Sheet "Total Data" and from sheet2: Copy/Paste B9:N200
> > to Sheet "Total Data" just below the data copied from sheet1....... and
> > likewise for all sheets in "Total Data". Secondly, I also want the name of
> > each sheet to be captured in Column A in the sheet "Total Data" accordingly.
> >
> > Please note that the sheet "Total Data" has also got the same layout as that
> > of the other sheets.
> >
> > Can you please help me out in creating a Macro to do this task.
> >
> > Your timely help will be greatly appreciated.
> > Prashanth KR.
> >

 
Reply With Quote
 
=?Utf-8?B?UHJhc2hhbnRoIEtS?=
Guest
Posts: n/a
 
      28th Aug 2007

Hi Tom,

Can you please look into this. I shall be very appreciative.

Thanks in advance,
Prashanth KR



"Prashanth KR" wrote:

>
> Wow..... it worked like a miracle for me. Thanks a lot Tom.......
>
> Similarly, this brings me to an other question, if you dont mind......
>
> What in case if I have different Workbooks named differently as the name say
> sheet1, sheet2 ..... having only one sheet containing the same data and
> layout. ie., say 50+ workbook and I want to collate the same in another
> workbook named "Total Data". Please note that all these workbooks are in one folder.
>
> I would greatly appreciate for your time and effort.
> Prashanth KR.
>
>
> "Tom Ogilvy" wrote:
>
> > Sub copyData()
> > Dim sh as Worksheet, sh1 as Worksheet
> > Dim r as Range, r1 as Range
> > set sh1= Worksheets("Total Data")
> > for each sh in worksheets
> > if lcase(sh.name) <> "total data" then
> > set r = sh.Range("A1").CurrentRegion
> > set r = r.offset(1,0).Resize(r.rows.count-1,1)
> > set r = Intersect(r.EntireRow,sh.Range("B:N"))
> > set r1 = sh1.Cells(rows.count,1).End(xlup)(2)
> > r.copy r1.offset(0,1)
> > r1.Resize(r.rows.count,1).Value = sh.Name
> > end if
> > Next
> > end sub
> >
> > --
> > Regards,
> > Tom Ogilvy
> >
> >
> > "Prashanth KR" wrote:
> >
> > > Hi,
> > >
> > > Currently, Iam doing a very tedious and time consuming job. Please help me
> > > out on this.
> > >
> > > I have a workbook having several worksheets like 50+ having the same layout
> > > i.e., Heading1, Heading2, Heading3 .... and may add more with the same
> > > headers in each sheet. The Headings starts from say B8:N8 and have some
> > > headings having a drop down list to be picked up in each row beneath that
> > > till row no. 200.
> > >
> > > Each sheet is named differently. My requirement is that I need to collate
> > > these information by copying and pasting in another sheet named "Total Data"
> > > of all these 50+ sheets information one below the other (i.e., from sheet1:
> > > Copy/Paste B9:N200 to Sheet "Total Data" and from sheet2: Copy/Paste B9:N200
> > > to Sheet "Total Data" just below the data copied from sheet1....... and
> > > likewise for all sheets in "Total Data". Secondly, I also want the name of
> > > each sheet to be captured in Column A in the sheet "Total Data" accordingly.
> > >
> > > Please note that the sheet "Total Data" has also got the same layout as that
> > > of the other sheets.
> > >
> > > Can you please help me out in creating a Macro to do this task.
> > >
> > > Your timely help will be greatly appreciated.
> > > Prashanth KR.
> > >

 
Reply With Quote
 
=?Utf-8?B?QU0=?=
Guest
Posts: n/a
 
      28th Aug 2007
I am posting my question here because I've tried to write in a new post but
it doesn't show up. Anyway, I need to copy cells from one worksheet to
another [same workbook], based on two conditions. The conditions are simple,
e.g. ISBLANK($A30) and $C30="OPEN", etc. The original column has 200 entries.
Only 50 of them may be copied in consecutive cells in a column on the new
worksheet.

Thanks for any help.
Atul


"Prashanth KR" wrote:

> Hi,
>
> Currently, Iam doing a very tedious and time consuming job. Please help me
> out on this.
>
> I have a workbook having several worksheets like 50+ having the same layout
> i.e., Heading1, Heading2, Heading3 .... and may add more with the same
> headers in each sheet. The Headings starts from say B8:N8 and have some
> headings having a drop down list to be picked up in each row beneath that
> till row no. 200.
>
> Each sheet is named differently. My requirement is that I need to collate
> these information by copying and pasting in another sheet named "Total Data"
> of all these 50+ sheets information one below the other (i.e., from sheet1:
> Copy/Paste B9:N200 to Sheet "Total Data" and from sheet2: Copy/Paste B9:N200
> to Sheet "Total Data" just below the data copied from sheet1....... and
> likewise for all sheets in "Total Data". Secondly, I also want the name of
> each sheet to be captured in Column A in the sheet "Total Data" accordingly.
>
> Please note that the sheet "Total Data" has also got the same layout as that
> of the other sheets.
>
> Can you please help me out in creating a Macro to do this task.
>
> Your timely help will be greatly appreciated.
> Prashanth KR.
>

 
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
Collating entries from multiple sheets jc132568 Microsoft Excel Worksheet Functions 3 24th Nov 2009 09:50 PM
Collating entries from multiple sheets jc132568 Microsoft Excel New Users 2 24th Nov 2009 02:25 PM
Create new sheets based off Data sheet, and template sheet Midget Microsoft Excel Programming 2 1st May 2007 09:55 PM
searching and collating values in multiple sheets dave99 Microsoft Excel Misc 1 7th Jan 2006 10:55 PM
Re: Collating Sheets question..advice plz Dave Peterson Microsoft Excel Programming 0 17th Jul 2003 03:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:46 PM.