I have columns in an Excel sheet that I would like to automatically fill with a formula.
The VBA code I currently have is:
Range("M3") = "=J3&"" & ""&K3": Range("M3:M" & lRow).FillDown
However, column K contains the spouse's name if they have one, which means sometimes the cell in column K is blank. If the person doesn't have a spouse, column M then reads:
First Name (from column J) &.
I've tried the following code but it causes an error:
Range("M3") = IF(Len(K3)=),"=J3&","=J3&"" & ""&K3": Range("M3:M" & lRow).FillDown
Thanks in advance.