'IF' formulae to obtain different numbers in a cell, when another cell gives a specific value - please help...

PJS_666

New Member
Joined
Sep 28, 2023
Messages
5
Office Version
  1. 365
=IF(AND(K29<215),"215",IF(AND(K29>215),"250",IF(AND(K29>251),"300",IF(AND(K29>301),"330",IF(AND(K29>331),"440"))))) -

I'm trying to generate a formulae to provide a number if is it firstly less than 215, you obtain 215, then numbers greater than 215, to provide, 250, 300,330 & 400 respectively. Unfortunately, the formulae only recognises the arguments up to IF(K29>215, 250).

Please help!!

Thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Welcome to the forum, one option could be to reverse your logic:
Excel Formula:
=LET(r,I4,IFS(r>331,"440",r>301,"330",r>251,"300",r>215,"250",r<215,"215"))
 
Upvote 0
yes - as any of the other numbers are >215
put them the other way round
=IF(AND(K29<215),"215",IF(AND(K29>215),"250",IF(AND(K29>251),"300",IF(AND(K29>301),"330",IF(AND(K29>331),"440"))))) -

=IF(AND(K29<215),"215",IF(AND(K29>331),"440",IF(AND(K29>301),"330",IF(AND(K29>251),"300",IF(AND(K29>215), 250)))))
note
"215" is not a number its text as you have put into "" if you want a number leave the "" OFF

=IF(AND(K29<215),215,IF(AND(K29>331),440,IF(AND(K29>301),330,IF(AND(K29>251),300,IF(AND(K29>215), 250,"")))))
 
Upvote 0
Solution
yes - as any of the other numbers are >215
put them the other way round
=IF(AND(K29<215),"215",IF(AND(K29>215),"250",IF(AND(K29>251),"300",IF(AND(K29>301),"330",IF(AND(K29>331),"440"))))) -

=IF(AND(K29<215),"215",IF(AND(K29>331),"440",IF(AND(K29>301),"330",IF(AND(K29>251),"300",IF(AND(K29>215), 250)))))
note
"215" is not a number its text as you have put into "" if you want a number leave the "" OFF

=IF(AND(K29<215),215,IF(AND(K29>331),440,IF(AND(K29>301),330,IF(AND(K29>251),300,IF(AND(K29>215), 250,"")))))
Massive thank you!!
 
Upvote 0
Another option:
=IFS(A1<215,215,A1>=331,440,A1>=301,330,A1>=251,300,A1>=215,250)
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,011
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top