IFERROR ZND NESTED IF QUESTIONS

Bolajr

New Member
Joined
Mar 5, 2023
Messages
2
Office Version
  1. 2013
Platform
  1. Windows
Days of the week
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Days NumberDay
=IFERROR(IF(A10=1,A2, IF(A10=2,A3,IF(A10=3,A4,IF(A10=4,A4,IF(A10=5,A6,IF(A10=6,A7,IF(A10=7,A8))))))), "PLEASE ENTER NUMBERS BETWEEN 1AND 7")
I keep getting "0" instead of the stated error message anytime I type a umber greater than 7 in cell A10. Please is the formula wrong? What acan I do to correct that?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
how about
=IF(A10=1,A2,IF(A10=2,A3,IF(A10=3,A4,IF(A10=4,A5,IF(A10=5,A6,IF(A10=6,A7,IF(A10=7,A8,"PLEASE ENTER NUMBERS BETWEEN 1AND 7")))))))

IFERROR is not likely to be invoked, as if you type a number greater then 7 - thats NOT an error, but the false part of your nested if

NOTE also a change of A4 to A5
 
Upvote 1
Solution
how about
=IF(A10=1,A2,IF(A10=2,A3,IF(A10=3,A4,IF(A10=4,A5,IF(A10=5,A6,IF(A10=6,A7,IF(A10=7,A8,"PLEASE ENTER NUMBERS BETWEEN 1AND 7")))))))

IFERROR is not likely to be invoked, as if you type a number greater then 7 - thats NOT an error, but the false part of your nested if

NOTE also a change of A4 to A5
Thank you very much, your solution is correct. I think the code I used initially would have worked if I used IFS instead of nested if
 
Upvote 0
yes, you could use IFS
although IFS has to evaluate every condition before getting a result - whereas Nested IF does NOT - so probably better off with the IF()

in case want an IFS()
=IFS(A10=1,A2,A10=2,A3,A10=3,A4,A10=4,A5,A10=5,A6,A10=6,A7,A10=7,A8,TRUE,"PLEASE ENTER NUMBERS BETWEEN 1AND 7")
 
Upvote 1
In case you want to use IFERROR, then you can try this method:
Excel Formula:
=IFERROR(INDEX(A2:A8,A10),"PLEASE ENTER NUMBERS BETWEEN 1 AND 7")
 
Upvote 1

Forum statistics

Threads
1,215,262
Messages
6,123,938
Members
449,134
Latest member
NickWBA

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