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"))))))))))
 
So what's wrong with my suggestion please? I provided a solution in post #2
You also did not answer my question : " What went wrong?"
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
It looks like this should not be formulated as IF.

This strikes me as more of a Lookup solution. Create a table as below: (Not sure if the 29 & 30 = 8 was a typo or not)

AB
221
232
243
254
265
276
287
298
308
319

Excel Formula:
=XLOOKUP(O3,A1:A10,B1:B10)
 
Upvote 0
I try to build the formula in a new sheet it's working (figure No. 1) but my original sheet does not work (figure No.2)
1.
1707927889544.png

2.
Untitled.png
 
Upvote 0
How about
Fluff.xlsm
NO
1
2122
3223
4324
5425
6526
7627
8728
9829
10930
111031
121132
131233
141334
151435
Sheet6
Cell Formulas
RangeFormula
N2:N15N2=IF(AND(O2>20,O2<36),MOD(O2,21),"")
 
Upvote 0
Solution
In what way? Your formula only caters for values of 22 to 35 which is what I've shown.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
I try to build the formula in a new sheet it's working (figure No. 1) but my original sheet does not work (figure No.2)
1.
View attachment 106847
2.
View attachment 106848
This is NOT the same as your original question =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")))))))))), where 22 is deduced from O3 instead of 21 ! You made me waste time unnecessarily :mad:
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
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