Hello
I've created this code below. The aim of it is to create a unique identifier name based on the contents of 3 cells in the same row (by concatenating the contents), namely in columns B, C and E. The VB editor highlights the 'assignment' statement in red (syntax is wrong).
So, for example, when i=2, cell A2 should equal 'B2&C2&E2'
Can someone help me out, please?
[vba]Public Sub CreateUniqueIdentifier()
Dim i As Long
Dim iLastRow As Long
With ActiveSheet
iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
iStart = 1
.Cells(1, "A").Value = "Identifier"
For i = 2 To iLastRow
.Cells(i, "A").Value = (B$i)&(C$i)&(E$i)
Next i
End With
End Sub
[/vba]