ThrottleWorks
Excel Ninja
Hi,
I have a loop. This loops checks around 50 condition in a run.
For example, the first condition from the loop will check if the Cell A5 has value as “Yamaha” if yes then it will highlight the cell.
Then macro will move to next condition, if value in Cell B2 is Honda then highlight the cell.
My problem is once a cell is highlighted in Column A, say A5, macro should not repeat the procedure for Column A.
If cell A5 and A6 both has value as “Yamaha” macro should highlight only cell A5 and move on to the next condition in the loop.
I want to highlight only the first instance from each condition and ignore rest.
Can anyone help me in this please.
I have a loop. This loops checks around 50 condition in a run.
For example, the first condition from the loop will check if the Cell A5 has value as “Yamaha” if yes then it will highlight the cell.
Then macro will move to next condition, if value in Cell B2 is Honda then highlight the cell.
My problem is once a cell is highlighted in Column A, say A5, macro should not repeat the procedure for Column A.
If cell A5 and A6 both has value as “Yamaha” macro should highlight only cell A5 and move on to the next condition in the loop.
I want to highlight only the first instance from each condition and ignore rest.
Can anyone help me in this please.
Code:
Set FindCell = Range_2.FindSheet.Range("A5").Value)
If FindCell Is Nothing Then
Application.StatusBar = " 'aaa' is not present in Sample File !"
Else
If ResultSheet.Cells(i, MyColumns(FindSheet.Range("a5")).Column) = "" Then
ResultPutSheet.Cells(i, MyColumns(FindSheet.Range("a5")).Column).Interior.Color = 1
End If
If ResultSheet.Cells(i, MyColumns(FindSheet.Range("a5")).Column).Interior.Color = 1 Then
Define action here
End If
End If: Set FindCell = Nothing