![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 7
|
On the very last page of a workbook, called Conclusion, I would like, every time it is opened, by the user, it to go through all of my other worksheets and grab data from them to copy into this last one. Speed is not important. Can someone give me a starting point, advice, on this?
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: London, UK
Posts: 167
|
put this code into the module relating to the worksheet that you require all the totals to be zapped onto...
Private Sub Worksheet_Activate() ActiveSheet.Cells.ClearContents outputrow = 1 For sn = 1 To ActiveWorkbook.Sheets.Count If ActiveSheet.Name <> Sheets(sn).Name Then For rowx = 7 To 100 If Sheets(sn).Cells(rowx, 2).Value <> "" Then ActiveSheet.Cells(outputrow, 1).Value = Sheets(sn).Name ActiveSheet.Cells(outputrow, 2).Value = Sheets(sn).Cells(rowx, 2).Value outputrow = outputrow + 1 End If Next End If Next End Sub
__________________
<table style="background-color:#0e54be" cellspacing="1" cellpadding="2"><td style="background-color:#ceffff;font-family:arial;color:#072c63;font-size:8pt;">***DALEY** :P**</td></table> |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|