LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default if until requirement met

An alternativel to Norman's suggestion is to go with Data Validation. Someone
can probably come up with a more elegant formula than mine:-

1) Select the Data menu
2) Select Validation
3) Select the Custom option from the Allow dropdown list
4) Enter the following formula in the formula window. Unfortunately, you
will have to type it in. The window won't accept copy and paste.

=AND(LEN(A1) = 5,
ISNUMBER(VALUE(LEFT(A1,2))),MID(A1,3,1)="/",ISNUMBER(VALUE(RIGHT(A1,2))))

5) Enter suitable text for Input Message and Error Alert. See these tabs.

Regards,
Greg

"stefan via OfficeKB.com" wrote:


Hi,
the user is required to enter data in one cell as ##/## i.e. 04/04
I would like to restrict the cell input to that and prompt the user if/how to
enter data.
I also want to embed this into a makro.
something like
If cellvalue < "##/##"
then msgbox "Please enter date in this format ##/## i.e. 04/04"
Else
msgbox "Good Format"
...and continue with the code once the data was inot correctly.
i cant figure out how to do this. Thank you for your help.
stefan


--
Message posted via http://www.officekb.com

 
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
bedroom requirement robzrob Excel Worksheet Functions 1 August 10th 08 07:51 PM
Sum with special requirement firroo Excel Worksheet Functions 2 May 29th 08 09:48 AM
formula requirement pcor New Users to Excel 6 January 7th 06 10:47 PM
Requirement in Bar chart rajeshkumar Charts and Charting in Excel 0 November 9th 05 05:29 PM
Before Save Requirement Phil Hageman[_3_] Excel Programming 2 January 12th 04 11:41 PM


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