Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
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
how do i combine data from multiple sheets into one sheet? David W. Owens Excel Discussion (Misc queries) 3 November 15th 08 04:50 PM
combine data into third sheet Sri Excel Worksheet Functions 2 June 20th 08 04:29 AM
Combine all the data's from different sheet to one sheet. cheenu Excel Worksheet Functions 1 May 15th 06 04:34 PM
How do I combine data from several sheets into one main sheet? Caren F Excel Worksheet Functions 0 April 19th 06 06:39 PM
combine code to get data in one sheet Soniya Excel Programming 2 October 10th 04 01:04 PM


All times are GMT +1. The time now is 03:21 AM.

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

About Us

"It's about Microsoft Excel"