D
Dennis Saunders
I have a 2 column list of (A)surname (B) forename. This list is changed
weekly. I want to write some code that concatenates col B,A as an array
formula but I'm stuck on the syntax as I want to use a variable.
So far it looks like: (where Sag = CountA(Names in Column A))
Dim Sag As Integer
Sag = Sheets("Variables").Range("A19")
Range(Cells(2, 4), Cells(Sag, 4)).Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(Range(Cells(2, 2):Cells(2, Sag)),Range(Cells(2,
1):Cells(2, Sag)))"
Selection.FormulaArray = _
"=CONCATENATE(Range(Cells(2, 2):Cells(2, Sag)),Range(Cells(2,
1):Cells(2, Sag)))"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
It must be something simple.
weekly. I want to write some code that concatenates col B,A as an array
formula but I'm stuck on the syntax as I want to use a variable.
So far it looks like: (where Sag = CountA(Names in Column A))
Dim Sag As Integer
Sag = Sheets("Variables").Range("A19")
Range(Cells(2, 4), Cells(Sag, 4)).Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(Range(Cells(2, 2):Cells(2, Sag)),Range(Cells(2,
1):Cells(2, Sag)))"
Selection.FormulaArray = _
"=CONCATENATE(Range(Cells(2, 2):Cells(2, Sag)),Range(Cells(2,
1):Cells(2, Sag)))"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
It must be something simple.