Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default Format cells for date or time without having to enter the / or :

I am trying to find out how to enter date and enter time without entering the
/ and the : each time; i.e. 12312007 and have it appear as 12/31/2007 or 831
and have it appear as 8:31. I used to know how to do this but have
forgotten...duh!
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default Format cells for date or time without having to enter the / or :

Cannot be done without VBA

See Chip Pearson's site for quickentry code.

http://www.cpearson.com/excel/DateTimeEntry.htm


Gord Dibben MS Excel MVP

On Tue, 14 Oct 2008 07:40:02 -0700, Darcyyc
wrote:

I am trying to find out how to enter date and enter time without entering the
/ and the : each time; i.e. 12312007 and have it appear as 12/31/2007 or 831
and have it appear as 8:31. I used to know how to do this but have
forgotten...duh!


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 100
Default Format cells for date or time without having to enter the / or :

Hi,,
If you're happy to have the result you want appear in the adjacent cell,
rather than the entry cell, can easily be done with a formula, otherwise VBA
as Gord says.

If A1 contains 16102008 then in B1,
=DATE(LEFT(A1,2),MID(A1,3,2),MID(A1,5,4))
will give you 16/10/2008

Or for times, if A1 contains 1035 then in B1 any of the following will give
you 10:35
=VALUE(LEFT(TEXT(A1,"0000"),2)&":"&RIGHT(TEXT(A1," 0000"),2))
=IF(LEN(A1)=3,TIME((LEFT(A1,1)),MID(A1,2,2),0),TIM E((LEFT(A1,2)),MID(A1,3,2),
0))
=INT(A1/100)/24 + MOD(A1,100)/1440
=LEFT(A1,LEN(A1)-2) & ":" & RIGHT(A1,2)
=TIMEVALUE(TEXT(A1,"#"":""00"))
and if you want 10:35AM try
=TIME((LEFT(A1,LEN(A1)-2)),RIGHT(A1,2),0)

Dave

url:http://www.ureader.com/msg/10356635.aspx
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
Some date/time cells appear in different format RoadRunner66 Excel Discussion (Misc queries) 3 June 23rd 06 04:28 PM
Excel: I enter date and format for date, but shows as number spohar Excel Discussion (Misc queries) 2 March 10th 06 08:40 PM
I get 0:00 when I format cells 4 time no matter what # I enter Mardy Excel Worksheet Functions 5 November 22nd 05 09:41 PM
how do I format cells to change date and time to just date bondam Excel Discussion (Misc queries) 3 July 3rd 05 01:10 PM
How do I format cells and enter data to be valued for TIME and th. George Excel Worksheet Functions 1 April 11th 05 07:23 PM


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