Interesting Question. One way that comes to mind would be to use a control such as a check box which returns TRUE/FALSE. Then use conditional Formatting to test the control in condition 1. If control is TRUE, don't format. If the control is False, go to 2nd condition which would be to highlight row if Col G is ??? (Non numberic?)
Trouble actually Programming it.
I think I have the basic algorythm down on how I would like to approach this. My problem is that I'm essentially ignorant to the macro vbasic language. Anyone know how to actually program this or can someone give me examples that maybe I could follow. Thanks.
-Greg
Hi Greg,
Here's some code that does what I believe you want. Just assign this macro to your button.
Happy computing.
Damon
Dim Hilighted As Boolean
Sub Hilight_Nonpriced_Rows()
Dim iRow As Long
Dim LastRow As Long
LastRow = [G65536].End(xlUp).Row
If Hilighted Then
For iRow = 1 To LastRow
If Cells(iRow, 7).Interior.Color = RGB(255, 0, 0) Then
Cells(iRow, 7).EntireRow.Interior.ColorIndex = 0
End If
Next iRow
Else
For iRow = 1 To LastRow
If Cells(iRow, 7).Value = "???" Then
Cells(iRow, 7).EntireRow.Interior.Color = RGB(255, 0, 0)
End If
Next iRow
End If
Hilighted = Not Hilighted 'toggle hilighted value
End Sub
Damon,
Great. Works perfectly thank you.
-Greg
Hi Greg, Here's some code that does what I believe you want. Just assign this macro to your button. Happy computing. Damon Dim Hilighted As Boolean Sub Hilight_Nonpriced_Rows() Dim iRow As Long LastRow = [G65536].End(xlUp).Row If Hilighted Then For iRow = 1 To LastRow If Cells(iRow, 7).Interior.Color = RGB(255, 0, 0) Then Cells(iRow, 7).EntireRow.Interior.ColorIndex = 0 End If Next iRow Else For iRow = 1 To LastRow If Cells(iRow, 7).Value = "???" Then Cells(iRow, 7).EntireRow.Interior.Color = RGB(255, 0, 0) End If Next iRow End If Hilighted = Not Hilighted 'toggle hilighted value