Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Data Validation

Hi All,

How can I set a data validation to a cell to accept
either multiples of 10 or 15 ?
any help..

TIA

Soniya
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Data Validation

Hi Soniya

Don't think you can without code -hope I'm wrong.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value = "" Then Exit Sub
If Val(Target.Value) Mod 10 = 0 Then
ElseIf Val(Target.Value) Mod 15 = 0 Then
Else
Target.Value = ""
End If
End If
End Sub

--
HTH. Best wishes Harald
Excel MVP

Followup to newsgroup only please.

"Soniya" wrote in message
...
Hi All,

How can I set a data validation to a cell to accept
either multiples of 10 or 15 ?
any help..

TIA

Soniya



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Data Validation

"Soniya" wrote in message
...
Hi All,

How can I set a data validation to a cell to accept
either multiples of 10 or 15 ?


Hi Soniya,

Choose Data/Validation and select the Custom option from the Allow
dropdown. Then enter the following formula:

=OR(MOD(A1,10)=0,MOD(A1,15)=0)

Be sure to change A1 to the address of the cell you're applying this
validation to.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Data Validation

"Rob Bovey" wrote in message
...

Choose Data/Validation and select the Custom option from the Allow
dropdown. Then enter the following formula:

=OR(MOD(A1,10)=0,MOD(A1,15)=0)


Cool. Thanks Rob. You live and you learn. (You in this case is me :-)
Now why is this suddenly "custom" and not "formula is" like in conditional formatting ?
Strange.

Best wishes Harald
Excel MVP

Followup to newsgroup only please.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Data Validation

"Harald Staff" wrote in message
...
Now why is this suddenly "custom" and not "formula is" like in conditional

formatting ?

Hi Harald,

Custom refers to the type of data validation you want to apply. It's one
of the selections in the Allow dropdown, which includes Whole number, List,
Date, etc. Once you've selected Custom from the Allow dropdown, the control
where you enter the formula is labeled "Formula", which is not too much
different from conditional formatting.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Data Validation

In the first cell where you wish to apply data validation (D32 in this
example), in the validation criteria box select "Custom". In the "Formula"
box enter the following and then copy the cell to the range where you want
the same type of validation.
=OR(MOD(D32,10)=0,MOD(D32,15)=0)

--
XL2002
Regards

William


"Soniya" wrote in message
...
| Hi All,
|
| How can I set a data validation to a cell to accept
| either multiples of 10 or 15 ?
| any help..
|
| TIA
|
| Soniya





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom data validation on cells with data validation values AKrobbins Excel Worksheet Functions 2 June 21st 11 04:20 PM
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
Data validation with validation lists and combo boxs Keith Excel Discussion (Misc queries) 1 October 12th 06 11:08 AM


All times are GMT +1. The time now is 09:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"