WaterSprite
Technical User
FinalRow = Range("B65536").End(xlup).Row
If WorksheetFunction.countA(cells) > 0 then
LastColumn = Cells.find(what:="*", after:=[B12]. _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious).column
The above code works great. Using it along with CurrentRegion, I can pick up a block of Excel that starts at B15 and currently ends at P69, but at the end of the year will be P380 and I can park the entire block of code at IG15 or I can park it at IG65136.
My question is this. Once I have parked the block of Excel at either of those two places, I cannot find it using a modified version of the above code. IE changing FinalRow to FinalRow3 and the range to Q65536 and the colums LastColum3 and the "After" to Q12. I thought if I just changed the range to be looked at, the block of Excel that was in the new location would be found.
The reason I want to be able to find the parking place via code is so the computer will do all of the work each January 1st of closing out the year and starting a new year's worth of data.
If WorksheetFunction.countA(cells) > 0 then
LastColumn = Cells.find(what:="*", after:=[B12]. _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious).column
The above code works great. Using it along with CurrentRegion, I can pick up a block of Excel that starts at B15 and currently ends at P69, but at the end of the year will be P380 and I can park the entire block of code at IG15 or I can park it at IG65136.
My question is this. Once I have parked the block of Excel at either of those two places, I cannot find it using a modified version of the above code. IE changing FinalRow to FinalRow3 and the range to Q65536 and the colums LastColum3 and the "After" to Q12. I thought if I just changed the range to be looked at, the block of Excel that was in the new location would be found.
The reason I want to be able to find the parking place via code is so the computer will do all of the work each January 1st of closing out the year and starting a new year's worth of data.