Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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). |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The "first" line was NOT part of the sub. It was just there to show you.
Delete it -- Don Guillett Microsoft MVP Excel SalesAid Software "Sudhir Amin" wrote in message ... 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). |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Don
application.goto sheets(1).Range("A1") Great I'll use this line from now on! Regards Peter "Don Guillett" wrote: The "first" line was NOT part of the sub. It was just there to show you. Delete it -- Don Guillett Microsoft MVP Excel SalesAid Software "Sudhir Amin" wrote in message ... 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Collate data from many workbooks | Excel Discussion (Misc queries) | |||
collecting data from many sheets to one sheet | Excel Discussion (Misc queries) | |||
new sheet with data from other sheets | Excel Discussion (Misc queries) | |||
How do I collate (match-up) one column's data with another? | Excel Worksheet Functions | |||
How do I search a data range for a particular value then collate . | Excel Discussion (Misc queries) |