ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting Part of a cell value (https://www.excelbanter.com/excel-programming/402053-deleting-part-cell-value.html)

newguy

Deleting Part of a cell value
 
I have a worksheet I have imported from another source and the Date
column also has a time stamp with it which I don't want. I would like
to cycle through all the cells and seperate the date from the time
stamp and delete the time stamp.

Here is what I have:
13-Aug-2007 04:46:42 PM PDT

Here is what I want:
13-Aug-2007

Thanks

Gary''s Student

Deleting Part of a cell value
 
High-light your data and pull-down:
Data Text to columns
use the space character as the separator. This will produce 4 columns.
Keep only the first
--
Gary''s Student - gsnu2007a


"newguy" wrote:

I have a worksheet I have imported from another source and the Date
column also has a time stamp with it which I don't want. I would like
to cycle through all the cells and seperate the date from the time
stamp and delete the time stamp.

Here is what I have:
13-Aug-2007 04:46:42 PM PDT

Here is what I want:
13-Aug-2007

Thanks


Bill Renaud

Deleting Part of a cell value
 
Using Data Text to columns will work if the data is still in text format.
However, if Excel converted the date and time stamps to dateserial values
(numbers), then you may have to insert a new column to the right of the
Date/Time, and use a formula:

B1: =Int(A1)

Copy and PasteSpecial the values back into the column, then delete the
original column of Date/Time.

--
Regards,
Bill Renaud





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com