IF/IF Not Statement Assistance

Disarmonious

Board Regular
Joined
Oct 31, 2016
Messages
144
I'm trying to figure out a formula that would return a value of "?" if a certain cell was not a group of numbers. Example: I want Cell A2 to display a question mark if the user does not enter the numbers 10, 15, 20, or 25.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Are you talking about returning that value to the same cell that they are trying to enter that number into, or should the formula in A2 look at the entry in another cell (i.e. A1)?

If the later, you can use a formula like this:
Code:
=IF(OR(A1=10,A1=15,A1=20,A1=25),A1,"?")

Otherwise, if you want it to do the same cell, you will probably need to use Data Validation (but that won't put a question mark in the cell, but rather prevent certain entries), or VBA.
 
Upvote 0

Forum statistics

Threads
1,224,752
Messages
6,180,742
Members
452,996
Latest member
nelsonsix66

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