Afternoon...
I have a recorded macro that pretty much does what I need, except that the files I'm manipulating have varying number of rows.
When I recorded it, I apparently had 1123 rows to deal with.
If my new files have less than that I'm OK.
But over 1123 and I have to manually do some work...who needs that??
I've been trying to be clever and have gotten it to auto select some things to the last cell in a column, but haven't been able to autofill down.
The bold line is what I'm stumbling on, the comment lines are what was running successfully before I outsmarted myself.
Thanks for any & all suggestions!
I have a recorded macro that pretty much does what I need, except that the files I'm manipulating have varying number of rows.
When I recorded it, I apparently had 1123 rows to deal with.
If my new files have less than that I'm OK.
But over 1123 and I have to manually do some work...who needs that??
I've been trying to be clever and have gotten it to auto select some things to the last cell in a column, but haven't been able to autofill down.
The bold line is what I'm stumbling on, the comment lines are what was running successfully before I outsmarted myself.
Thanks for any & all suggestions!
Rich (BB code):
Range("E2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-3]&""-""&RC[-1]"
Range("E2").Select
ActiveWindow.SmallScroll ToRight:=1
' line below is this one with auto select down Selection.AutoFill Destination:=Range("E2:E1123")
Selection.AutoFill Destination:=Selection.End(xlDown).Select
'Range("E2:E1123").Select
'Range("E2").Select
'Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Last edited by a moderator: