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

I have a scheduling template that we use at work. It needs to allow
allow all types of data entry EXCEPT dates and times. Any numbers
entered must be in a format that I can use in formulas.

In other words, I need to have entries that can be numbers or text but
NOT times.
Thus I need the cells formatted as General. General formatting makes
10:00 show up as 0.416667. I need data entries to be restricted to
non-
times. Can I have data validation set up to restrict time entries only
but still be able to enter numbers that can be used in formulas?

I have tried to flag with data validation using Right(A1,3)=":" but
that doesn't seem to work. Any ideas?? Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,365
Default data validation

Per information in the other post on this subject, if an entry has a colon in
it, Excel is going to treat it as a time. But if you'll set the cell format
up as Text then you can enter words or numbers into the cell and if the entry
looks like a number, then it will be treated as a number in formulas
referring to it.

Try this: format a cell (A1?) as text and enter 3.14159 into it. Move over
a couple of columns and enter the formula =A1+15 and the display should be
18.14159 showing that Excel took the text "3.14159" and converted it to a
number before using it in the formula. But that formula is going to give
strange results (#VALUE) when you put a word into A1 and the formula trys to
figure out what you really mean.

Excel also gets similarly confused if the number to be added has a colon in
it. With A1 still formatted as text, enter 10:00 into it, this time you will
see 15.41667 in the cell with the formula because Excel internally converted
the text 10:00 to a time value before adding it to the 15 in the formula.

By the way, your Right(A1,3) should be Mid(A1,3,1) to just pull out the
colon and test it. Right(A1,3) would return ":00" if the entry in A1 is
"10:00". Maybe that will be of some help?

" wrote:

I have a scheduling template that we use at work. It needs to allow
allow all types of data entry EXCEPT dates and times. Any numbers
entered must be in a format that I can use in formulas.

In other words, I need to have entries that can be numbers or text but
NOT times.
Thus I need the cells formatted as General. General formatting makes
10:00 show up as 0.416667. I need data entries to be restricted to
non-
times. Can I have data validation set up to restrict time entries only
but still be able to enter numbers that can be used in formulas?

I have tried to flag with data validation using Right(A1,3)=":" but
that doesn't seem to work. Any ideas?? Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,365
Default data validation

Gary's student has offered a VBA solution in the 3rd posting you've made on
this topic. Please keep it all in one discussion - it helps us all. You get
to see all options, advice and information about it in one place. Others get
to see the same thing and don't cover the same ground again.

" wrote:

I have a scheduling template that we use at work. It needs to allow
allow all types of data entry EXCEPT dates and times. Any numbers
entered must be in a format that I can use in formulas.

In other words, I need to have entries that can be numbers or text but
NOT times.
Thus I need the cells formatted as General. General formatting makes
10:00 show up as 0.416667. I need data entries to be restricted to
non-
times. Can I have data validation set up to restrict time entries only
but still be able to enter numbers that can be used in formulas?

I have tried to flag with data validation using Right(A1,3)=":" but
that doesn't seem to work. Any ideas?? Thanks


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
Crazy Data Validation ... List Validation Not Working TW Bake Excel Programming 1 March 29th 07 02:41 AM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Programming 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 01:43 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"