Data Validation : Multiple If condtions

chandrashekar

Well-known Member
Joined
Jul 15, 2005
Messages
529
Office Version
  1. 365
Platform
  1. Windows
Hello,

am trying below formula in data validation{Custom) but not able to exact result.

Formula:
=IF(AND(D3="Excellent",F3>=10,F3<=15),TRUE,IF(AND(D3="Good",F3>=8,F3<=10),TRUE,IF(AND(D3="Average",F3>=5,F3<=7),TRUE,IF(AND(D3="Poor",F3>=1,F3<=4),TRUE,FALSE))))
1712399469611.png

Regards,
Chandrashekar B
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Showing us a formula that you said doesn't work doesn't give us enough information to tell you what will work.

Start by telling us what cell contains this data validation rule.

Then explain what you want the rule to do instead of what this one does.

By the way, a data validation formula returns TRUE or FALSE. You can do this with Boolean logic, with no IF. However, this just reformulates the logic you started with so I doubt this will solve your problem.
Excel Formula:
OR(AND(D3="Excellent",F3>=10,F3<=15),AND(D3="Good",F3>=8,F3<=10),(AND(D3="Average",F3>=5,F3<=7),AND(D3="Poor",F3>=1,F3<=4))

I also note that F3 can be 10 for both Good and Excellent. Is that correct?
 
Upvote 0
Solution
Hello,

am trying to validate value based on below condition. If user type invalid information then Data validation should throw error.

Good8-10
Excellent11-15
Poor1-4
Average5-7

I have changed formula as per your input but still it is not working.

=OR(AND(D3="Excellent",F3>=11,F3<=15),AND(D3="Good",F3>=8,F3<=10),AND(D3="Average",F3>=5,F3<=7),AND(D3="Poor",F3>=1,F3<=4))

Regards,
Chandrashekar B
 
Upvote 0
Hello,

am trying to validate value based on below condition. If user type invalid information then Data validation should throw error.

Good8-10
Excellent11-15
Poor1-4
Average5-7

I have changed formula as per your input but still it is not working.

=OR(AND(D3="Excellent",F3>=11,F3<=15),AND(D3="Good",F3>=8,F3<=10),AND(D3="Average",F3>=5,F3<=7),AND(D3="Poor",F3>=1,F3<=4))

Regards,
Chandrashekar B
Thanks it is working now.

Regards,
Chandrshekar B
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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