Hey guys, I'm having a heck of a time to get my looping macro to function properly. I have a workbook that contains a variable number of worksheets. I'm running significant formatting drills on all worksheets to automate most of my manual work. In this scenario I have a workbook with 65 worksheets all uniquely named. I need the value in cell A3 of each worksheet to relocate itself to the bottom of the data in column E of its own worksheet. Here's what I've got:
Sub RelocateTotalInvoice()
'
' RelocateTotalInvoice Macro
Dim ws As Worksheet
For Each ws In Worksheets
Range("A3").Select
Selection.Copy
Selection.End(xlToRight).End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Next ws
End Sub
The problem I'm having is that the formula will just repeat itself on the first worksheet instead of moving to the next worksheet and repeating there so it just pastes the same value 65 times one cell beneath the next. I've tried moving the "Next ws" up in the formula to before "ActiveCell.Offset(1, 0).Select" this modified the vba to only post the value once in the active worksheet instead of 65 times, but it still wouldn't move to the next worksheet to continue the process. Help please
Bookmarks