LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Gathering data from all worksheets for a report

I'm want to generate a report by gathering info from certain cells on all
but 4 spreadsheets in a workbook.
I want the selected data from each worksheet to go into a row on the
"Reports" worksheet starting at row 5 (under the headings that remain
constant)
This is what I have so far:
Sub ReportBasic()

Sheets("Reports").Select ' This is the sheet that has the report format
Range("A5").Select ' This is where the first item form the first
worksheet will go

For Each Worksheet In ThisWorkbook.Worksheets

Select Case Worksheet.Name
Case "Index", "Trans", "Customers", "Reports" ' Sheets that I won't pull
data from
'don't do anything
Case Else

' Gather data from valid worksheet

Set CustName = ActiveSheet.Range("A1")
Set CustNumber = ActiveSheet.Range("G1")
Set Limit = ActiveSheet.Range("I2")
Set Freq = ActiveSheet.Range("J2")
Set DueDate = ActiveSheet.Range("L2")
Set Status = ActiveSheet.Range("M2")
Set Total = ActiveSheet.Range("R1")
Set LastPaid = ActiveSheet.Range("N2")
Set LastPaidAmt = ActiveSheet.Range("O2")

' Insert Customer Info on report
Sheets("Reports").Select
ActiveCell.Value = CustNumber
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = CustName
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Total
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = DueDate
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Freq
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Limit
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Status
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = LastPaid
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = LastPaidAmt
ActiveCell.FormulaR1C1 = CustName
'
End Select
Next

End Sub


Any help is greatly appreciated.

Jonco


 
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
Importing data from daily worksheets into my annual report Sonia Marie[_2_] Excel Discussion (Misc queries) 2 July 27th 09 10:58 PM
Gathering data from multiple worksheets Andy F Excel Discussion (Misc queries) 1 February 1st 08 01:18 PM
Gathering totals from various worksheets smooney Excel Worksheet Functions 6 November 16th 07 07:30 PM
gathering information from many worksheets luv2bike2 Excel Discussion (Misc queries) 0 March 8th 07 07:56 PM
Gathering data Kelly[_7_] Excel Programming 1 January 13th 04 04:13 PM


All times are GMT +1. The time now is 01:10 AM.

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"