Hi I get a break down below. What I do is some matching if values match.
On a normal sheet it works fine with the numbers, but I am trying to run it off of numbers that formulas are pulling in.
The thing is im not sure if the break is telling me this or its the cell formats
On a normal sheet it works fine with the numbers, but I am trying to run it off of numbers that formulas are pulling in.
The thing is im not sure if the break is telling me this or its the cell formats
Code:
Sub Run()
Dim myFndCll As Range
Dim myNumID As String
Dim myAmount As Double
Dim lrow As Long
lrow = Cells(Rows.count, "A").End(xlUp).Row
For LngLp = 2 To lrow
myNumID = Cells(LngLp, "A") 'Get New Value
[COLOR=#b22222] myAmount = Cells(LngLp, "A").Offset(, 1) <------Breaks here[/COLOR]
Set myFndCll = Columns(3).Find(What:=myNumID, _
LookIn:=xlValues, _
LookAt:=xlWhole)
If myFndCll Is Nothing Then
'Value doesn't exist in column C so highlight value in column A
Cells(LngLp, "A").Interior.ColorIndex = 4
Else
If myAmount <> myFndCll.Offset(, 1) Then
myFndCll.Offset(, 1).Interior.ColorIndex = 6
Cells(LngLp, "A").Offset(, 1).Interior.ColorIndex = 6
End If
End If
Next LngLp
End Sub