rnordquest
New member
- Jul 17, 2003
- 148
I have the following in a macro:
For i = 1 To endRow
PN = ActiveCell.Value
EC1 = ActiveCell.Offset(0, 1).Value
If EC1 = "" Then GoTo Next_PN
For j = 3 To Worksheets.Count
Sheets(j).Activate
Range("B4").Activate
ACV = ActiveCell.Value
If ACV = PN Then
ActiveCell.Offset(0, 16).Value = EC1
My If check never finds a match because PN=1234 and ACV="1234". Originally PN was formatted general and ACV as text. I reformatted ACV as general but I still don't get a match. How do I fix this?
For i = 1 To endRow
PN = ActiveCell.Value
EC1 = ActiveCell.Offset(0, 1).Value
If EC1 = "" Then GoTo Next_PN
For j = 3 To Worksheets.Count
Sheets(j).Activate
Range("B4").Activate
ACV = ActiveCell.Value
If ACV = PN Then
ActiveCell.Offset(0, 16).Value = EC1
My If check never finds a match because PN=1234 and ACV="1234". Originally PN was formatted general and ACV as text. I reformatted ACV as general but I still don't get a match. How do I fix this?