andrewb90
Well-known Member
- Joined
- Dec 16, 2009
- Messages
- 1,077
Hello all,
I know I have an issue with the statement, but I'm not entirely sure how to correct it. Any guidance would be greatly appreciated.
Red is the problem. What I am trying to do is if "C" matches that value, then C:G will be selected. Additionally If anybody can assist me with putting multiple values as a search instead of just "front", i'd like to add several others, I'm just not sure how.
I know I have an issue with the statement, but I'm not entirely sure how to correct it. Any guidance would be greatly appreciated.
Code:
Dim r As Long For r = 4 To 50
If r <> 6 And r <> 45 Then
[COLOR=#ff0000] If Range("C" & r).Value = "Front" Then Range("C" & r: "G" & r).select[/COLOR]
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
End If
Next r