View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Times before noon show different

On Dec 8, 11:43*am, "xcel__" wrote:
Column A has cells with times before 12:00 noon. *10:30 in the
cell shows as 10:30 in the formula bar

after 12:00 noon, shows as 01:30 in the cell. In the formula bar
it shows as 01:30:00

How can I make before noon times to show as 10:30:00
This is so I can sort by times.Morning first, then afternoon and then night


As Gord conjectures, the problem in the first example is that the time
is entered as text, not numeric.

It would behoove you to determine how that happens and avoid it if you
can.

The corrective action depends on details that you omitted.

Assuming that you have a mix of text and numeric times in A1:A100, you
can convert them all to numeric times by doing the following.

1. Select A1:A100.

2. Use Text To Columns to convert A1:A100 to numeric. In XL2003,
click on Data Text To Columns. Be sure that Fixed Width and General
are selected at the appropriate steps.

3. Format A1:A100 as Custom hh:mm or hh:mm:ss, depending on your
requirements, which are ambiguous.

Note: Don't bother about how it appears in the Formula Bar. Focus on
how you want it displayed in the cell. The Formula Bar has its own
format, which you cannot control.