I'm an experienced Excel user, but only getting into the VBA side of things. I want to automate some processes in an old spreadsheet to save time and control data entry. However, I'm stumbling on how to add the concatenate function in my VBA code.

I'm copying data from an old source sheet into a new target sheet via a macro. In the source sheet, cell A1=first name and cell A2=last name; however, in the new target sheet, cell A4=name.

When running the macro, I receive a "Sub or Function not defined" compile error in the code below:


wsTarget.Range("A4").Value = wsSource.Range(CONCATENATE(A1, "" - "", A2))


Any assistance will be appreciated. Thanks.