G
Guest
This is a follow up on my last question. I am sorry I did not formulate my
question right. In my example I have only one range (“a8:a30â€). I need it,
after it matches the cell = 1122 in column A, to go to column B and meet
another condition. Basically, I need it to match column A with column B and
then I want it to evaluate IF.
Dim cell As Range
Dim str As String
For Each cell In Range("a8:a30")
If cell = 1122 Then
cell.Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
ElseIf Not IsEmpty(cell.Value) Then
cell.Select
With Selection.Interior
.ColorIndex = 5
.Pattern = xlSolid
End With
Else: Range("a33").Select
ActiveCell.FormulaR1C1 = "end of transactions"
End If
Next cell
End Sub
question right. In my example I have only one range (“a8:a30â€). I need it,
after it matches the cell = 1122 in column A, to go to column B and meet
another condition. Basically, I need it to match column A with column B and
then I want it to evaluate IF.
Dim cell As Range
Dim str As String
For Each cell In Range("a8:a30")
If cell = 1122 Then
cell.Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
ElseIf Not IsEmpty(cell.Value) Then
cell.Select
With Selection.Interior
.ColorIndex = 5
.Pattern = xlSolid
End With
Else: Range("a33").Select
ActiveCell.FormulaR1C1 = "end of transactions"
End If
Next cell
End Sub