Concatenate function in vba

  • Thread starter Thread starter camerons
  • Start date Start date
C

camerons

I am trying to do the following:

Sub Sample()
For a = 1 To 100
r = concatenate(Cells(a, 1), Cells(a, 2))
If r = "Mr.Jones" Then
Cells(a, 3) = ""
End If
Next a
End Sub

There is more to it, but I can't seem to use the concatenate function.
"Left", "Right" are ok, but not this one it seems. What am I missing?

Thank you
Chris Cameron
(e-mail address removed)
 
One way:

Dim a As Long
For a = 1 To 100
If Cells(a, 1).Text & Cells(a, 2).Text = "Mr.Jones" Then _
Cells(a, 3).ClearContents
Next a
 
Thanks, I've got it working now.
What would you suggest for learning correct syntax for VBA?
 
Back
Top