Question: I think that I ' m defining the Key & Identifier incorrectly as well as ID which is causing my subroutine not to work..See below

I think that I'm defining the Key & Identifier incorrectly as well as ID which is causing my subroutine not to work..See below and kindly assist where you think I'm going wrong.Sub HighlightRows()
Dim nr As Integer, i As Integer, ID As String, Identifier As String, Key As Integer
Call Reset
nr = WorksheetFunction.CountA(Columns("A:A"))-1
Identifier = Left(ID,1)
Key = Ieft(Mid(ID,4,4),1)
ID = Range.Cells(i,1).Select
For i =2 To nr
If Range("A" & nr)= Identifier And Range("A" & nr)= Key Then
Range(Cells(i,1), Cells(i,3)).Interior.ColorIndex =4
End If
Next i
End Sub

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!