copy cells with criteria

excel_user_1966

New Member
Joined
Mar 24, 2002
Messages
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?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,039
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top