VBA Change Cell Text

satkin2

New Member
Joined
Oct 22, 2009
Messages
25
Hi,

I've got a spreadsheet that has a row of dates in the format _31May2011 _30Jun2011 _31Jul2011 etc;
I'm going to link into these dates in a chart, so want to remove the _ so as that I can use them as dates, currently they are treated as text.

How can I change the cell value to remove the _ and set the new field to be in date format?

Many thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
So, add them! :)

How do I do this for multiple columns? I've got a few years worth of dates, not just the ones I used as an example. Going into each cell and putting the space in would not be suitable as this spreadsheet will get overwritten each month, putting it back to the original _31May2011 etc format, so if I could VBA it to do this it would be great.
 
Upvote 0
Try this. After the Find/Replace to remove the underscore

1. Select the column by clicking its heading label.

2. Data|Text To Columns|Finish
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,245
Members
452,900
Latest member
LisaGo

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