remove string or space before date

aris

New Member
Joined
Nov 28, 2004
Messages
27
Dear friends


I have a column containing dates (e.g 22/10/1999...) and i would like to change the format of this date so i can match it with another dataset. I realised that i couldn't change the format my dates column because there is a space before the date in each cell and excel do not recognise it as a date.

Is there any way to remove the space [ 22/10/1999] before date in each cell and make it look like [22/10/1999]? I could do it one by one but my sample is almost 3000 observations.

Thank you very much

Aris
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
aris

You could try this:

1. Ensure that the column to the right of your dates is empty. (Insert a new column if required)
2. Select the column with the dates (and spaces).
3. Data|Text to Columns...|Delimited|Next|Tick 'Space'|Finish
4. Delete the old (now empty) column.
 
Upvote 0
Hi,

Try highlight the column, then Edit / Replace and put a space in 'find What' and click 'Replace all'
 
Upvote 0
aris said:
Peter

Thank you very much for your help! Everything seems to work fine!!!

Best

Aris
Yes, but take note of Alan's - it's quick, simple and doesn't require an extra column.
 
Upvote 0
IMPORTANT

Hi to all of you!

It seems that DATEVALUE function can handle all strings even those with preceeding spaces, that makes it very simple. Try it!

Eli
 
Upvote 0
Re: IMPORTANT

eliW said:
Hi to all of you!

It seems that DATEVALUE function can handle all strings even those with preceeding spaces, that makes it very simple. Try it!

Eli
Eli, I don't have any problem with the DATEVALUE function, but for the problem posed by Aris, does not seem like the best solution to me. It requires an extra column and the formula would need to be repeated nearly 3000 times according to the information in the original post. If Aris is doing other work on the sheet, these 3000 formulas could be re-calculating regularly, which is a lot of extra processing that is not needed with either of the other two solutions.
 
Upvote 0

Forum statistics

Threads
1,224,884
Messages
6,181,572
Members
453,054
Latest member
arz007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top