Left/Right Functions

chet645

Board Regular
Joined
Nov 10, 2010
Messages
67
Office Version
  1. 365
Platform
  1. Windows
I have a bunch of dates that that are formatted as:

1252011
1112011
12302010
12152010
11162010
etc.

the month is first one or two digits, with the date (2 digits) and year following (4 digits). I want to use the right/left function to strip the month out of the data. The problems is the month can either be the first 1 or 2 characters depending on the month. Any suggestions would be greatly appreciated.

Thanks.

Chet
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
So long as the Day is always 2 digits, and year is always 4 digits...
Try

=LEFT(A1,LEN(A1)-6)
 
Upvote 0
Welcome to the Board!

I'd try Data-->Text to Columns. If you skip the first two options, on the third tab there's a date conversion option. It should work for all of the valid dates in your list.

HTH,
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

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