Hi All,
I'm trying to merge 2 lots of columns into 1 column at the end of the data to provide a look up reference. The first column contains staff ID and the second contains question ID.
My code is below and it just doesn't seem to work, I get a type mismatch but guides I've followed suggest the below code. Any help anyone can offer would be greatly appreciated. For reference, column BI will never have data on the sheet so I'm using it as a 'safe column' for the merge as I know will always be empty.
I'm trying to merge 2 lots of columns into 1 column at the end of the data to provide a look up reference. The first column contains staff ID and the second contains question ID.
My code is below and it just doesn't seem to work, I get a type mismatch but guides I've followed suggest the below code. Any help anyone can offer would be greatly appreciated. For reference, column BI will never have data on the sheet so I'm using it as a 'safe column' for the merge as I know will always be empty.
Code:
Dim dws as Worksheet
Dim LRow as long
Set dws = Sheets("Data")
LRow = dws.Cells(dws.Rows.Count, "A").End(xlUp).Row
dws.Range("BI2:BI" & LRow) = Range(Cells(2, 4).Address(False, False), (Cells(2, 25).Address(False, False))).Merge