Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Separate AM/PM from time.

In column B I have 1000 time entries with the following format. 9:30AM,
10:30PM. I would like to move the AM or Pm into a new column. I've tried
"fixed width", also tried changing the format to put a space between the time
and the AM/PM, but nothing has worked.

Any suggestions?
Don
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Separate AM/PM from time.

Hi Don,

To separate the AM/PM from the time in column B, you can use the Text to Columns feature in Excel. Here are the steps:
  1. Select the column B that contains the time entries.
  2. Go to the Data tab in the ribbon and click on Text to Columns.
  3. In the Text to Columns Wizard, choose Delimited and click Next.
  4. In the Delimiters section, uncheck all the boxes and click Next.
  5. In the Column data format section, choose Time and select the format that matches your time entries (e.g. 1:30 PM).
  6. Click Finish.

This will separate the time and AM/PM into two separate columns. You can then delete the original column B if you no longer need it.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Separate AM/PM from time.

format column C to hh:mm (so no AM/PM is shown)
In C1 enter
=if(b10.5,b1-0.5,b1)
this will then only show the 12h clock even if PM
in D1 enter
=if(b10.5,"PM"."AM")
Then if you like hide column B
Copy/fill the formulas in C1 and D1 down as needed

Regards
Steve

"cuartetto" wrote:

In column B I have 1000 time entries with the following format. 9:30AM,
10:30PM. I would like to move the AM or Pm into a new column. I've tried
"fixed width", also tried changing the format to put a space between the time
and the AM/PM, but nothing has worked.

Any suggestions?
Don

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Separate AM/PM from time.

Are these really times or are they text?

If they're plain old text, then I'd convert them to times.

Select the range
Edit|replace:
what: AM
with: _AM (where _ represents the space character)
replace all

And once more for the PM.

Then the results should be real times. And you can use a formula like the ones
Steve suggested.

But I'd keep the data as real times -- maybe format the cell so that I see:

21:30
instead of
9:30 PM
though.



cuartetto wrote:

In column B I have 1000 time entries with the following format. 9:30AM,
10:30PM. I would like to move the AM or Pm into a new column. I've tried
"fixed width", also tried changing the format to put a space between the time
and the AM/PM, but nothing has worked.

Any suggestions?
Don


--

Dave Peterson
  #5   Report Post  
Senior Member
 
Location: Philippines
Posts: 161
Default

Quote:
Originally Posted by cuartetto View Post
In column B I have 1000 time entries with the following format. 9:30AM,
10:30PM. I would like to move the AM or Pm into a new column. I've tried
"fixed width", also tried changing the format to put a space between the time
and the AM/PM, but nothing has worked.

Any suggestions?
Don
Let's say that cell A1 has 10:30PM.

In cell A2, you should have:
=(LEFT(A1,LEN(A1)-2)&" "&RIGHT(A1,2))*1
Then format the cell in Time 13:30 format.

In cell A3, you should have:
=Right(A1,2)

Last edited by wickedchew : August 1st 10 at 09:22 AM
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
Elapsed time when separate cells contain time and separate date Gnugs New Users to Excel 1 March 7th 07 08:48 AM
Time log adding time from separate sheets teastman New Users to Excel 1 December 31st 05 04:14 PM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 02:48 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM


All times are GMT +1. The time now is 03:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"