if a formula in excel with multible conditions

omsumo

New Member
Joined
Dec 30, 2023
Messages
15
Office Version
  1. 2010
Platform
  1. Windows
Dear are there any formula to select a specific value based on the specific condition
I tried this formula but it did not work
=IFs(O3=22,"1",IF(O3=23,"2",IF(O3=24,"3",IF(O3=25,"4",IF(O3=26,"5",IF(O3=27,"6",IF(O3=28,"7",IF(O3=29,"8",IF(O3=30,"8",IF(O3=31,"9"))))))))))
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
You did not explain " does not work"? In what way?
Be aware that a number between double quotes is text
Can O3 be smaller than 22 or larger than 31 ?
Perhaps
Excel Formula:
=If(and(O3>21,O3<30),O3-21,03-22))
 
Upvote 0
Many thanks,
O3 (cell reference)
22 (cell value)
"1" (result)
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Giving us a formula that does not work does not help much. What would help is giving us some sample data and telling/showing us what is the expected result and why.
This might help greatly: XL2BB
 
Upvote 0
here you are
1707916703502.png
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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