Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combine data on one sheet
I have multiple sheets that contain data. I want to create a summary page
that holds all the data on every tab into one newly generated sheet. For Example: On one sheet "C22" = 1 and is set to "C44" = China On the next sheet "C22" = 3 and is set to "C44" = Japan The newly generated sheet would present: C1 = 1, D1 = China C2 = 3, D2 = Japan I have some ideas, but a macro set to a button would be best. What code could I use? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combine data on one sheet
Sub Summarize()
Dim i as Long, sh as Worksheet Dim sh1 as Worksheet i = 0 set sh1 = Worksheets("Summary") for each sh in Activeworkbook.Worksheets if sh.Name < sh1.Name then i = i + 1 sh1.cells(i,3).Value = sh.Range("C22").Value sh1.Cells(i,4).Value = sh.Range("C44").Value end if Next End Sub -- Regards, Tom Ogilvy "dogpigfish" wrote in message ... I have multiple sheets that contain data. I want to create a summary page that holds all the data on every tab into one newly generated sheet. For Example: On one sheet "C22" = 1 and is set to "C44" = China On the next sheet "C22" = 3 and is set to "C44" = Japan The newly generated sheet would present: C1 = 1, D1 = China C2 = 3, D2 = Japan I have some ideas, but a macro set to a button would be best. What code could I use? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combine data on one sheet
Works great. I was overcomplicating it. I am entry level for coding in
excel. "Tom Ogilvy" wrote: Sub Summarize() Dim i as Long, sh as Worksheet Dim sh1 as Worksheet i = 0 set sh1 = Worksheets("Summary") for each sh in Activeworkbook.Worksheets if sh.Name < sh1.Name then i = i + 1 sh1.cells(i,3).Value = sh.Range("C22").Value sh1.Cells(i,4).Value = sh.Range("C44").Value end if Next End Sub -- Regards, Tom Ogilvy "dogpigfish" wrote in message ... I have multiple sheets that contain data. I want to create a summary page that holds all the data on every tab into one newly generated sheet. For Example: On one sheet "C22" = 1 and is set to "C44" = China On the next sheet "C22" = 3 and is set to "C44" = Japan The newly generated sheet would present: C1 = 1, D1 = China C2 = 3, D2 = Japan I have some ideas, but a macro set to a button would be best. What code could I use? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i combine data from multiple sheets into one sheet? | Excel Discussion (Misc queries) | |||
combine data into third sheet | Excel Worksheet Functions | |||
Combine all the data's from different sheet to one sheet. | Excel Worksheet Functions | |||
How do I combine data from several sheets into one main sheet? | Excel Worksheet Functions | |||
combine code to get data in one sheet | Excel Programming |