Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
How we can restrict only time with ten minutes interval are entered into a text box? Is it possible to acheive this using mode function? i want only 0.0,0.1,0.2,0.3,0.4,0.5,1.0,1.1,1.2, etc to be entered in the text box TIA Soniya |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
maybe you could use a combobox with a dropdown pointing to the rowsource
with your data. also, maybe you could use data validation in the cell the textbox was going to fill. just some thoughts, didn't test anything -- Gary "Soniya" wrote in message ups.com... Hi All, How we can restrict only time with ten minutes interval are entered into a text box? Is it possible to acheive this using mode function? i want only 0.0,0.1,0.2,0.3,0.4,0.5,1.0,1.1,1.2, etc to be entered in the text box TIA Soniya |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Soniya, If the idea is to limit your inputs to one decimal place only for values below the multiples of 0.5 ie effectively for 0.0 to 0.5; 1.1 to 1.5; 2.1 to 2.5 etc. then you can try: If Application.Round(TextBox1.Value,1) -Int(Application.Round(TextBox1.Value,1)) <=0.5 Then Application.Round(TextBox1.Value,1) And if you desire to have values above 0.5 to be rounded up, institute the above with a qualification as below: If Application.Round(TextBox1.Value,1) -Int(Application.Round(TextBox1.Value,1)) <=0.5 Then Application.Round(TextBox1.Value,1) *Else Application.RoundUP(TextBox1.Value,1)* Myles. -- Myles ------------------------------------------------------------------------ Myles's Profile: http://www.excelforum.com/member.php...o&userid=28746 View this thread: http://www.excelforum.com/showthread...hreadid=490373 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
format textbox to time | Excel Discussion (Misc queries) | |||
Format a Userform textbox to Military time | Excel Programming | |||
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys | Excel Programming | |||
Format As TIME In A TextBox | Excel Programming | |||
TextBox in UserForm with 24h time format | Excel Programming |