Hiii all,
Plllease helpp.
what is the method to concatenate values from two columns??
I want to obtain the values from three different columns in excel and want to check if those values are concatenated and present exactly in the fourth coulmn .
For eg.If column 1 has-PT50
column2 has-456
and column3 has -abc
in column 4 must contain PT50456abc.Otherwise itmust be colored in red. can we use '&' for it.? Please find the code.Its showin error.
Sub newone()
Dim res As String
For i = 4 To 8
res = "PT50" & Cells(i, 3).Value&Cells(i, 5).Value&Cells(i, 15).Value
If Cells(i, 16).Value <> res Then
Cells(i, 16).Select
With Selection.Font
.Color = -16776961
.TintAndShade = 0
End With
End If
Next i
End Sub
Help
Bookmarks