chrono2483
Board Regular
- Joined
- Aug 23, 2014
- Messages
- 164
- Office Version
- 2016
Hello,
My goal is to be able to copy down data until the end of the range. The range can vary, based on the size of the raw data pasted. Running the following script works to copy down the data (not the prettiest, but it looks to work), however because it doesn't know when to end, it errors out. Is there a way to tell it to loop until the last row in the range?
Thank you.
My goal is to be able to copy down data until the end of the range. The range can vary, based on the size of the raw data pasted. Running the following script works to copy down the data (not the prettiest, but it looks to work), however because it doesn't know when to end, it errors out. Is there a way to tell it to loop until the last row in the range?
Code:
'Copy Down Month
Range("A1").Select
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Selection.End(xlDown).Select
Range("A1").Select
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Selection.End(xlDown).Select
Range("A1").Select
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Selection.End(xlDown).Select
Thank you.