Simple Data Validation

Lim

New Member
Joined
Jul 30, 2008
Messages
2
Hi all,

I can't believe I'm starting a thread for this, but I think my brain just burnt out (I can smell that electrical smell you get when something short-circuits)..

Anyway,

All I want to do is have a simple error message appear if a user trys to enter something other than a 2, 3, or 6. This is going to apply to a range of cells from D6 to J6.

I'm familiar with data validation and am sure I got something very similar to work with excel 2003, but now I'm using 2007 and it's not playing the game (for me at least)..

So far I've tried a few formulas using the 'custom' drop down box in the settings tab of the data validation box:
=if(or(2,3,6)true,false)
=if(or("2","3","6")true,false)

I've also tried applying this formula to a single cell with a view to validate 1 cell at a time:
=if(d6=or(2,3,6)true,false)

No luck. It can't be that hard I'm sure.... :(

Thanks.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
<TABLE style="WIDTH: 125pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=166 border=0 x:str><COLGROUP><COL style="WIDTH: 125pt; mso-width-source: userset; mso-width-alt: 6070" width=166><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 125pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=166 height=17 x:str="'=(D6=2)+(D6=3)+(D6=6)>0">=(D6=2)+(D6=3)+(D6=6)<>0</TD></TR></TBODY></TABLE>
 
Last edited:
Upvote 0
Select cells D6:J6

In Data Validation, select List
Under Source, type;
2,3,6
If you don't want the drop down, uncheck In-cell dropdown.
On the Error Alert tab, make sure Style is set to Stop
 
Upvote 0
aarrghhh!

I knew it had to be simple... just not a simple as I feel right now.

Thanks heaps!
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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