keith05281967
Board Regular
- Joined
- May 6, 2011
- Messages
- 68
Hello again VBA geniuses,
I've gotten some great feedback from this message board.
I have another question. I have some code that formats the interior color of cells in column A based on certain criteria.
What I'd now like to do is have a message box pop up listing the "values" in those formatted cells. My code is below. The code in red where i'm floundering:
For i = 2 To LastRow
If InStr(1, Cells(i, ColumnNumber).Value, ", AK") <> 0 Or InStr(1, Cells(i, ColumnNumber).Value, ", HI") <> 0 Then
Cells(i, ColumnNumber).Interior.ColorIndex = 4
Cells(i, "A:A").Interior.ColorIndex = 4
intCounter3 = intCounter3 + 1
End If
Next i
If intCounter3 <> 0 Then
MsgBox (intCounter3 & " occurrences of Hawaii, or Alaska state abbv found and hi-lited in green.")
End If
i = 0
For i = 2 To LastRow
If Cells(i, "A:A").Interior.ColorIndex = 4 Then
MsgBox Cells( )
End If
Next i
thanks,
Keith
I've gotten some great feedback from this message board.
I have another question. I have some code that formats the interior color of cells in column A based on certain criteria.
What I'd now like to do is have a message box pop up listing the "values" in those formatted cells. My code is below. The code in red where i'm floundering:
For i = 2 To LastRow
If InStr(1, Cells(i, ColumnNumber).Value, ", AK") <> 0 Or InStr(1, Cells(i, ColumnNumber).Value, ", HI") <> 0 Then
Cells(i, ColumnNumber).Interior.ColorIndex = 4
Cells(i, "A:A").Interior.ColorIndex = 4
intCounter3 = intCounter3 + 1
End If
Next i
If intCounter3 <> 0 Then
MsgBox (intCounter3 & " occurrences of Hawaii, or Alaska state abbv found and hi-lited in green.")
End If
i = 0
For i = 2 To LastRow
If Cells(i, "A:A").Interior.ColorIndex = 4 Then
MsgBox Cells( )
End If
Next i
thanks,
Keith