Hello,
Below VBA code with 2 if statements, when running the code, both 'if' conditions are ignored and 'then' action is not executed. I tested these 'then' actions without if statement and these work fine so this should not be the problem.Can there be a problem with definition of variables RowData and RowFormula? Wrong datatype? Or can someone tell me what problem is?
Dim RowData, RowFormula As Long
RowData = ActiveSheet.Range("A3").End(xlDown).Row
RowFormula = ActiveSheet.Range("H3").End(xlDown).Row
If RowFormula < RowData Then
...
End If
If RowFormula > RowData Then
...
End If
Many thanks in advance!
Regards,
Kaatje
Bookmarks