Remove time from cell

R

Richard Gendron

Hi there,

I am importing several rows/columns from a main frame and I would like to
create a macro that I can re-use on different columns that would strip from
the space till the end

The import is mm/dd/yyyy hh:mm:ss and a column or two are mm-dd-yyyy
hh:mm:ss am/pm

So I would to find the first space (after the date) and delete till then
end.

Does anyone have a macro I could use that would accomplish this for the 2
different data formats ?.

It is strange to say but a few cells are correct.

tks, rg
 
J

John

-----Original Message-----
Hi there,

I am importing several rows/columns from a main frame and I would like to
create a macro that I can re-use on different columns that would strip from
the space till the end

The import is mm/dd/yyyy hh:mm:ss and a column or two are mm-dd-yyyy
hh:mm:ss am/pm

So I would to find the first space (after the date) and delete till then
end.

Does anyone have a macro I could use that would accomplish this for the 2
different data formats ?.

It is strange to say but a few cells are correct.

tks, rg


.
Try the following:

Select the column or data range :
from the menu option select data
select text to columns,

use the fixed width option and put a page break between
date and time.

Just make sure that the next column is blank so that the
data when spilt can go into column A and Column B

Just another option.

Regards

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top