H
Howard
Excel 2010
These two lines of code from Help work fine to return "Alp".
Dim LResult As String
LResult = Left("Alphabet",3)
What's the correct syntax to get my IF - THEN line of code to look at each Celln in range NumToColor and if the Left two characters in Celln = Range("B15") then apply ColorIndex 3.
Dim Celln As Range
Dim NumToColor As Range
Set NumToColor = Range("D14:M23")
For Each Celln In NumToColor
Celln.Interior.ColorIndex = xlNone
If Left(Celln, 2).Value = Range("B15").Value Then
Celln.Interior.ColorIndex = 3
End If
Next
Thanks.
Regards,
Howard
These two lines of code from Help work fine to return "Alp".
Dim LResult As String
LResult = Left("Alphabet",3)
What's the correct syntax to get my IF - THEN line of code to look at each Celln in range NumToColor and if the Left two characters in Celln = Range("B15") then apply ColorIndex 3.
Dim Celln As Range
Dim NumToColor As Range
Set NumToColor = Range("D14:M23")
For Each Celln In NumToColor
Celln.Interior.ColorIndex = xlNone
If Left(Celln, 2).Value = Range("B15").Value Then
Celln.Interior.ColorIndex = 3
End If
Next
Thanks.
Regards,
Howard