Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do i collate data from different sheets in one sheet?

Every week i receive about 45-50 sheet. I have a macro which pulls all the
data from these sheets into a single excel file in different sheets and also
renames the sheets as per the name of the file. The macro also makes a
summary of the data in the sheets and sums it in the cells between A2:D2.

Is there a way where i can get the names of the sheets listed one below
another and also have the cells A2-D2 from each worksheet pasted in front of
the names of the worksheets in one single sheet (the summary sheet).
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default How do i collate data from different sheets in one sheet?

Sudhir

Try this (summary on sheet1)

Sub SheetSummary()
r = 2
Worksheets(1).Select
Range("A1").Select

For i = 2 To Sheets.Count
Cells(r, 1) = Worksheets(i).Name
Range(Cells(r, 2), Cells(r, 5)).Value = Worksheets(i).Range("A2:D2").Value
r = r + 1
Next
End Sub

Regards
Peter

"Sudhir Amin" wrote:

Every week i receive about 45-50 sheet. I have a macro which pulls all the
data from these sheets into a single excel file in different sheets and also
renames the sheets as per the name of the file. The macro also makes a
summary of the data in the sheets and sums it in the cells between A2:D2.

Is there a way where i can get the names of the sheets listed one below
another and also have the cells A2-D2 from each worksheet pasted in front of
the names of the worksheets in one single sheet (the summary sheet).

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How do i collate data from different sheets in one sheet?

Hi Billy,

This is exactly how i wanted it and it worked just great. Thanks a lot buddy.

Regards
Sudhir
"Billy Liddel" wrote:

Sudhir

Try this (summary on sheet1)

Sub SheetSummary()
r = 2
Worksheets(1).Select
Range("A1").Select

For i = 2 To Sheets.Count
Cells(r, 1) = Worksheets(i).Name
Range(Cells(r, 2), Cells(r, 5)).Value = Worksheets(i).Range("A2:D2").Value
r = r + 1
Next
End Sub

Regards
Peter

"Sudhir Amin" wrote:

Every week i receive about 45-50 sheet. I have a macro which pulls all the
data from these sheets into a single excel file in different sheets and also
renames the sheets as per the name of the file. The macro also makes a
summary of the data in the sheets and sums it in the cells between A2:D2.

Is there a way where i can get the names of the sheets listed one below
another and also have the cells A2-D2 from each worksheet pasted in front of
the names of the worksheets in one single sheet (the summary sheet).

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How do i collate data from different sheets in one sheet?

Hi Billy,

Could you also please let me know that if there are filters set in a
particualar sheet, is there a way to run a macro so that there are no filters
anywhere in the file on any sheet??

Regards

"Billy Liddel" wrote:

Sudhir

Try this (summary on sheet1)

Sub SheetSummary()
r = 2
Worksheets(1).Select
Range("A1").Select

For i = 2 To Sheets.Count
Cells(r, 1) = Worksheets(i).Name
Range(Cells(r, 2), Cells(r, 5)).Value = Worksheets(i).Range("A2:D2").Value
r = r + 1
Next
End Sub

Regards
Peter

"Sudhir Amin" wrote:

Every week i receive about 45-50 sheet. I have a macro which pulls all the
data from these sheets into a single excel file in different sheets and also
renames the sheets as per the name of the file. The macro also makes a
summary of the data in the sheets and sums it in the cells between A2:D2.

Is there a way where i can get the names of the sheets listed one below
another and also have the cells A2-D2 from each worksheet pasted in front of
the names of the worksheets in one single sheet (the summary sheet).

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default How do i collate data from different sheets in one sheet?

Sheets(i).AutoFilterMode = False
Sub SheetSummary()
application.goto sheets(1).Range("A1")
on error resume next
For i = 2 To Sheets.Count
Cells(i, 1) = sheets(i).Name
Sheets(i).AutoFilterMode = False
Range(Cells(i, 2), Cells(i, 5)).Value = sheets(i).Range("A2:D2").Value
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Sudhir Amin" wrote in message
...
Hi Billy,

Could you also please let me know that if there are filters set in a
particualar sheet, is there a way to run a macro so that there are no
filters
anywhere in the file on any sheet??

Regards

"Billy Liddel" wrote:

Sudhir

Try this (summary on sheet1)

Sub SheetSummary()
r = 2
Worksheets(1).Select
Range("A1").Select

For i = 2 To Sheets.Count
Cells(r, 1) = Worksheets(i).Name
Range(Cells(r, 2), Cells(r, 5)).Value =
Worksheets(i).Range("A2:D2").Value
r = r + 1
Next
End Sub

Regards
Peter

"Sudhir Amin" wrote:

Every week i receive about 45-50 sheet. I have a macro which pulls all
the
data from these sheets into a single excel file in different sheets and
also
renames the sheets as per the name of the file. The macro also makes a
summary of the data in the sheets and sums it in the cells between
A2:D2.

Is there a way where i can get the names of the sheets listed one below
another and also have the cells A2-D2 from each worksheet pasted in
front of
the names of the worksheets in one single sheet (the summary sheet).




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How do i collate data from different sheets in one sheet?

Hi,

This does not seem to be working and is giving me an error saying invalid
outside procedure. It goes into the view code and is highlighting the False
in the first line of the macro you have given me. Please let me know what i
am doing wrong.

Regards
Sudhir

"Sudhir Amin" wrote:

Every week i receive about 45-50 sheet. I have a macro which pulls all the
data from these sheets into a single excel file in different sheets and also
renames the sheets as per the name of the file. The macro also makes a
summary of the data in the sheets and sums it in the cells between A2:D2.

Is there a way where i can get the names of the sheets listed one below
another and also have the cells A2-D2 from each worksheet pasted in front of
the names of the worksheets in one single sheet (the summary sheet).

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do i collate data from different sheets in onesheet?

hi,

Can you please tell me how will I pull out data from different workbooks to one work book?

I think sudhir's macro would help....
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Collate data from many workbooks cgy Excel Discussion (Misc queries) 2 November 23rd 07 07:17 PM
collecting data from many sheets to one sheet Khoshravan Excel Discussion (Misc queries) 12 June 7th 07 10:01 PM
new sheet with data from other sheets exceluser111 Excel Discussion (Misc queries) 2 August 22nd 06 03:12 AM
How do I collate (match-up) one column's data with another? Mark Excel Worksheet Functions 2 March 16th 06 04:21 PM
How do I search a data range for a particular value then collate . Hulkascooby Excel Discussion (Misc queries) 0 January 19th 05 03:21 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"