Reputation: 224
I'm looking for an excel formula that picks a difference between 2 columns, but only if the value in column A is equal or maximum less than 1 in column B (either way). My table is as follows:
I know my logic below is wrong but I tried the below formula and it only picks equal values:
=IF(I2=O2,"Yes",IF(I2>=(SUM(O2+1)),"Yes",IF(I2<=(SUM(O2+1)),"Yes")))
Can you please advise how to modify the above formula to get the right results? Thanks in advance.
Upvotes: 1
Views: 480
Reputation: 50008
If I understand your question correctly - use ABS
on the difference and check if <=1
.
=IF(ABS(A2-B2)<=1,"Yes","No")
Upvotes: 4