Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying from other worksheets

Status
Not open for further replies.

Evening

Technical User
Jan 19, 2005
45
0
0
CA
I have 13 Excell worksheets, 1,2,3.. 13, one for each month & 1 more for summary.
I am entering some data for each month in separate worksheet in columns A-F, starting for row 4, to below (I don't know how many rows will be in the end of the month.)
I want in sheet # 13 to be the summary of data for entire year (sum of all 12 sheets).
I want to generate the summary sheet with VBA. If I am in sheet 13, clicking on button, with VBA program go first to sheet 1, find the last entered row, then select (Range A4:F & lastrow), copy it, going back to Sheet 13, find field A4, paste it.
Next, going back to Sheet 2, find the last entered row, select (Range A4:F & lastrow), copy it, going back to Sheet 3, find the last entered row+1, past it, going to sheet 3.... and so on to Sheet 12.
I can generate the easiest part of this VBA with macro, but to find the last row, is just doen't work to me, even i was reading some VBA helps.
I'd apreciate if somebody could help me with VBA codes.

Thanks

Les

 



Hi,

"I have 13 Excell worksheets, 1,2,3.. 13, one for each month & 1 more for summary."

Boy, you've shot yourself in the foot, my friend! This is unfortunately a typical mistake that novice spreadsheet users make -- chopping similar data up into separate tables, sheets, workbooks etc.

I STRONGLY recommend, consolidating your monthly data into ONE table, adding a column for the month as a REAL DATE, not Jan, Feb, Mar etc.

From a consolidated table, your Summary SHEET, in the same workbook, can be a snap, whereas now, herding all that data, would take a pack of sheepdogs working 24X7 and then some.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top