Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default complex validation for lottery numbers

I am trying to create a custom validation formula to validate a series
of six numbers that are lottery numbers.

The numbers should be whole numbers between 1 and 49 and be unique

I can do this formula to make them unique

=countif($A$3:$F$3;A3)=1

or this to make the numbers between 1 & 49

=AND(A3=1,A3<=49)

is there a way to combine these two validation rules into one which
does both or must I resort to validation using VBA?

  #2   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Aman,

How about:
=AND(COUNTIF($A3:$F3,A3)<=1,A3=1,A3<=49)

The active (white) cell of your selection must be A3 for this formula.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

wrote in message
oups.com...
I am trying to create a custom validation formula to validate a series
of six numbers that are lottery numbers.

The numbers should be whole numbers between 1 and 49 and be unique

I can do this formula to make them unique

=countif($A$3:$F$3;A3)=1

or this to make the numbers between 1 & 49

=AND(A3=1,A3<=49)

is there a way to combine these two validation rules into one which
does both or must I resort to validation using VBA?



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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Data Validation Window? Ken Excel Discussion (Misc queries) 1 January 11th 05 11:48 PM
Sorting when some numbers have a text suffix confused on the tundra Excel Discussion (Misc queries) 5 December 18th 04 11:19 PM
Sorting imported "numbers" Confused on the tundra Excel Discussion (Misc queries) 5 December 17th 04 08:33 PM
finding common numbers in large lists Jenn Excel Worksheet Functions 1 November 11th 04 08:42 PM


All times are GMT +1. The time now is 06:31 PM.

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

About Us

"It's about Microsoft Excel"