Data Validation

mbailey

New Member
Joined
May 7, 2009
Messages
8
Hello,

I can't quite figure this one out!

In cell a1 I want to be able to enter a price.
in cell a2 I have another price.
in cell a3 I have the ratio of a1/a2
I want a data valuation error alert to appear in a1 if a3 is greater than 40%.

At the moment my data valuation error only appears if I manually change a3 to greater than 40%.

Thanks for your help
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
mbailey

You should be able to use the formula section for the custom option, in the cell A1 data validation window
Code:
=IF(A3>0.4,FALSE,TRUE)

Thanks
tigs
 
Upvote 0
Is there any way I can use the formula above in conjunction with a list of allowed values too?

Thanks
 
Upvote 0
are you talking about a dropdown list?

or are you talking about just where you list the
=IF(OR("Red","Blue","ETC"),TRUE,FALSE)

or
=IF(AND(A3>0,A3<0.4),TRUE,FALSE)

Thanks
tigs
 
Upvote 0
What about just having your list of allowed values in your A1 Data Validation and changing your A3 cell formula to something like this

=IF(A1/A2>0.4,"ERROR",A1/A2)
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,723
Members
452,939
Latest member
WCrawford

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