Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error - moving to next line in macro instead of next sub...

7 views
Skip to first unread message

csub...@gmail.com

unread,
Mar 29, 2016, 11:58:27 AM3/29/16
to
I'm not highly literate with macro building but one that I did works really well generally.

It did not run successfully however when there is only one row of data besides the header row. I have "On Error Resume Next" and since the autofill starts and ends in the same cell, it causes an error. It then goes to the next sub.

I'd like it to just continue on go on to the next line of code (copy/paste as values) instead of stepping out and going to the next sub macro.


Range("F1").Select
ActiveCell.FormulaR1C1 = "String"
Range("F2").Select
ActiveCell.FormulaR1C1 = "=RC[-3]&RC[-1]&RC[12]"
Range("F2").Select
Range("F2").AutoFill Destination:= _
Range("F2:F" & Range("A" & Rows.Count).End(xlUp).Row), _
Type:=xlFillDefault
Columns("F:F").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Any help would be appreciated.
0 new messages