You don't need a greater than or lesser than conditional VBA. You can just build a formula using VBA instead, and use it in column W (or the last empty column)
Anyway, since your query was Excel related, moving this thread to the Excel Help section. Also, please try to give a more meaningful and concise thread title, so that other people looking for similar solutions will be able to get search results from search engines. This can only happen if the thread title used is apt.Code:Sub GetErrorOK() With Worksheets("ccm_dispute_results") .Range("W2:W" & .Cells(.Rows.Count, 1).End(xlUp).Row).Formula = "=IF(OR(ABS(N2)>ABS(R2),ABS(N2)>ABS(M2)),""Error"",""OK"")" End With End Sub




Reply With Quote

Bookmarks