#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Data Validation


Hi,

Okay, let me try to simplify my problem.

Cell *CN2* is formatted as *d* and contains the formula:
=DATE(2006,7+1,0)

Cell *CP2* is also formatted as *d* and contains the formula:
=IF(CN2=DATE(2006,7+1,0),\"\",DATE(2006,7+1,0))

CK5[/b] IS THE INPUT CELL AND NEEDS TO BE RESTRICTED TO ACCEPT *ONLY
THE NUMBER IN CN2 - IF CP2 IS BLANK*, OR *A NUMBERS GREATER THAN OR
EQUAL TO THE NUMBER IN CN2 AND LESS THAN OR EQUAL TO THE NUMBER IN CP2
- IF CP2 IS NOT BLANK*.

SO I SET THE *VALIDATION CITERIA* TO *CUSTOM*, AND TRY TO ENTERED THE
FOLLOWING FORMULA:

*=OR(AND(CK5=DAY($CN$2),CK5<=DAY($CP$2)),AND(CK5= DAY($CN$2),$CP$2
=\"\"))

I get the message "The formula currently evaluates to an error. Do you
which to continue?"

When I choose "Yes," it does not accept [b]31* in cell CK5, (but when I
delete the formula in cell CP2 - leaving the cell blank, it accepts 31
only)

I know that the problem is being caused by the blank ("") in cell CP2
but I can't figure out how to fix it.

Any help?

Thanks,
Gos-C


--
Gos-C


------------------------------------------------------------------------
Gos-C's Profile: http://www.excelforum.com/member.php...o&userid=14518
View this thread: http://www.excelforum.com/showthread...hreadid=568954

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Data Validation


Gos-C,

In the Data validation option select Whole Number and between.

In the Minimum enter =DAY(CN2)

In the Maximum enter =IF(CP2<"",DAY(CP2),DAY(CN2))

This sets the minimum to whatever is in CN2 and the maximum to CN2 if
CP2 is blank and CP2 if CP2 is not blank.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=568954

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


Yes! It worked. Thanks a million, Steve. Appreciate your help.

Gos-C


--
Gos-C


------------------------------------------------------------------------
Gos-C's Profile: http://www.excelforum.com/member.php...o&userid=14518
View this thread: http://www.excelforum.com/showthread...hreadid=568954

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


Glad I could help and thanks for the feedback.

Steve,


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=568954

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
Data validation dakotasteve Excel Worksheet Functions 13 August 5th 06 01:28 AM
Macro question Chris Excel Worksheet Functions 12 July 7th 06 01:23 AM
Inputting data to one worksheet for it effect another daedalus1 Excel Discussion (Misc queries) 1 June 25th 06 04:39 PM
named range, data validation: list non-selected items, and new added items KR Excel Discussion (Misc queries) 1 June 24th 05 05:21 AM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 07:21 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"