If Statement that prompts user

John P

Board Regular
Joined
Oct 17, 2002
Messages
108
Hello,
I would like to write an if statement that prompts the user when the data input into a field is not within the expected range. For example, the result must be within 15% of a given number, if the user inputs a value less than 85% of the number, I want to prompt they are too low and must provide a reason...on the other hand, if they are 115% of the number, I want to prompt that they are too high and need to provide a reason. Is this possible? Any advise is appreciated.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Yup, it's possible, but you don't need an IF statement.

Just use Data Validation, under the Data menu.
 
Upvote 0
John,

Elaborating on Kristy's contribution, in the window, there are tabs called "Error Alert" and "Input Message". The error alert lets the user input data not on you list and the input message let's you write your own error message
 
Upvote 0
Thank you for the prompt responses. Am I limited to the formula I can use? I plugged in >.85*ad4,<1.15*ad4 and the prompt occurs regardless of what I enter for a number.
 
Upvote 0
John,

In the Allow window, select decimals and set a min and max value. If these are the only numbers that you want entered, select Stop on the error alert tab.
 
Upvote 0
You may also want to check out the "Custom" option under validation. You can enter formulas there, but I'm not sure how it would work for what you're trying to do.
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,178
Members
448,871
Latest member
hengshankouniuniu

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