Hello Mr. Excel Forum members,
I need you help and advice. The code below works fine but I wanted to get away from hard coding the column / row numbers and use the Table header names instead.
Any help would be greatly appreciated.
-Don
I need you help and advice. The code below works fine but I wanted to get away from hard coding the column / row numbers and use the Table header names instead.
Any help would be greatly appreciated.
-Don
Code:
If rNumber_of_Rows = Number_of_Rows Then
Sheets("Review Sheet").Activate
Range("AZ2", Cells(Rows.Count, "AZ").End(xlUp)).SpecialCells(xlCellTypeVisible).Cells(1, 1).Select
rCount = 0
While rCount < rNumber_of_Rows
ActiveCell.FormulaR1C1 = _
"=IF(ISNA(VLOOKUP(RC21,'RAW-DATA 2017'!R[-31]C11,1,FALSE)), ""NOK"", ""OK"")"
If ActiveCell.Value = "NOK" Then
MsgBox ("HALT There is a mismatch between Review & RAW data!"), vbOKOnly, "ERROR STOP!!!"
End If
ActiveCell.Offset(1, 0).Select
rCount = rCount + 1
Wend
Else
MsgBox "ERROR Please check latest update before saving report rows in tab Review Sheet do not match"
Sheets("Review Sheet").Select
Range("AZ2", Cells(Rows.Count, "AZ").End(xlUp)).SpecialCells(xlCellTypeVisible).Cells(1, 1).Select
End If
Last edited: