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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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,599
Messages
6,120,447
Members
448,966
Latest member
DannyC96

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