Burrgogi
Active Member
- Joined
- Nov 3, 2005
- Messages
- 495
- Office Version
- 2010
- Platform
- Windows
I've got some text in col. A, B, C.
So for example:
A1 = kayak
B1 = tools
C1 = Zebra
In D1, I've been manually typing in the following:
=CONCATENATE(A1,B1,C1)
And then I'll do an autofill down to the very last cell which might be D100 or D112... It depends on how long my list is.
Basically I recorded a macro but the problem is that since the length of my list varies, how do I tell VBA to continue autofill on col. D as long as there some value contained in col. A?
When I run this code, VBA gives me an error message: "Argument Not optional".
I'm using Office 2007, BTW.
So for example:
A1 = kayak
B1 = tools
C1 = Zebra
In D1, I've been manually typing in the following:
=CONCATENATE(A1,B1,C1)
And then I'll do an autofill down to the very last cell which might be D100 or D112... It depends on how long my list is.
Basically I recorded a macro but the problem is that since the length of my list varies, how do I tell VBA to continue autofill on col. D as long as there some value contained in col. A?
Code:
Sub test()
With Range("D:D")
.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=CONCATENATE(RC[-3],RC[-2],RC[-1])"
.Value = .AutoFill
End With
End Sub
When I run this code, VBA gives me an error message: "Argument Not optional".
I'm using Office 2007, BTW.
Last edited: