Jed Shields
Active Member
- Joined
- Sep 7, 2011
- Messages
- 283
- Office Version
- 365
- Platform
- Windows
Hello all,
I'm trying to add a formula that adds the first and last names to a cell. It works fine but I'm having trouble adding a space between the names. Any ideas on the correct syntax?
Cheers,
Jed
I'm trying to add a formula that adds the first and last names to a cell. It works fine but I'm having trouble adding a space between the names. Any ideas on the correct syntax?
Code:
Sub FullName()
Dim LastRow As Long
LastRow = Range("AJ" & Rows.Count).End(xlUp).Row
Range("BH1").Select
ActiveCell.FormulaR1C1 = "Full Name"
Range("BH2").Select
ActiveCell.Formula = "=concatenate(C2&""&D2)"
'Range("BH2").Select
' Selection.AutoFill Destination:=Range("BH2:BH" & LastRow)
Range("BH2").AutoFill Destination:=Range("BH2:BH" & LastRow)
End Sub
Cheers,
Jed