I am recording a macro, I do a Control Shift down arrow to find the next occupied cell then press up arrow and copy\paste. However the macro is adding in a range of cells.
Since the report can change daily and have a different number rows each time it is run, the range will not work.
Please advise
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A10").Select
ActiveCell.FormulaR1C1 = "=RC[1]"
Range("A10").Select
Selection.Copy
Range("B10").Select
Selection.End(xlDown).Select
Range("A827").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
I need to replace all of these sections Range("A827").Select with a command that finds the next occupied cell.
Since the report can change daily and have a different number rows each time it is run, the range will not work.
Please advise
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A10").Select
ActiveCell.FormulaR1C1 = "=RC[1]"
Range("A10").Select
Selection.Copy
Range("B10").Select
Selection.End(xlDown).Select
Range("A827").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
I need to replace all of these sections Range("A827").Select with a command that finds the next occupied cell.