Forum Discussion
NEED HELP WITH FORMULA
Yes, but your syntax is incorrect.
In Excel, this expression: D2<=19.99 >=17.99
would be: AND(D2<=19.99, D2>=17.99)
But, it's not really necessary because if your first test (D2<=17.99 ) fails, then D2 must be > 17.99 so there is no need to test that.
Also, I would suggest rounding both sides of your conditions to 2 decimals to avoid any problems with double precision point math, which can cause rounding errors at the hardware level (doesn't matter that your data is only to two decimals).
=E2+IF(ROUND(D2,2)<=ROUND(17.99,2),2.5,IF(ROUND(D2,2)<=ROUND(19.99,2),3.5,IF(ROUND(D2,2)<=ROUND(22.99,2),4.5,IF(ROUND(D2,2)<=ROUND(27.99,2),5.5,4))))
Alternatively, you could create a lookup table (say the table is in A1:B6):
0 2.50
18 3.50
20 4.50
23 5.50
28 4.00
∞
Then, your forumula is:
=E2+VLOOKUP(ROUND(D2,2),$A$1:$B$6,2,1)
- jayzedAug 18, 2020Copper ContributorThank u so much 😊