How can I restrict cell entry to
minutes and seconds
or
hour minutes and seconds
using : seperator ??
any help??
How can I restrict cell entry to
minutes and seconds
or
hour minutes and seconds
using : seperator ??
any help??
You could use Data VAlidation and set the cell as Time!
Regards,
Simon
Please read this before cross posting!
In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)
I currently use this code but it always turns the time to 1??With Range("Talk_Time") cell = .Cells(1, 1).Address(False, False) .Locked = False .Validation.Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Operator:=xlGreater, _ Formula1:="=AND(" & cell & ">=TIME(0,0,1)," & cell & "<=TIME(23,59,59))" .Validation.IgnoreBlank = False .Validation.ErrorTitle = "Time Error" .Validation.ErrorMessage = "Please Enter Minutes & Seconds in this format 23:59" .Validation.ShowError = True .WrapText = False .ColumnWidth = 7 .Interior.ColorIndex = 43 .EntireColumn.Hidden = False End With
What do you mean by it always turns to 1, it works for me, including making the cells green.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
It works for me sometimes, but more often than not it shows a value of 1
for example talk time was 1hr 20munites and 9 seconds.
So I input 1:20:09
It displays 0
in the formula bar it show 0.0556597222222222
im confused.
That time works fine for me.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
why doesnt it work for me?
I couldn't get it to fail either.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Hmmmm, do you have custom formatting set up for the cell?
Regards,
Simon
Please read this before cross posting!
In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)
Not as far as I am aware, but there maybe some other script within another module that might be chaning the formatting. I will check and get back