Excel Formula Date

tropics123

Board Regular
Joined
May 11, 2016
Messages
85
Hello, I'm hoping someone will have a good solution for this. Our client sends a list of dates and it either has seven or eight digits in column M, depending on the month. The format we want is MM/DD/YYYY.
The formula I have is: =LEFT(RIGHT(M2,8),2)&"/"&LEFT(RIGHT(M2,6),2)&"/"&RIGHT(M2,4)

However, the issue is when the month is a single digit such as May, then it throws off the formula. Please help!

Column MColumn N
Client's DateConvert Date
106202010/06/2020
1204201712/04/2017
1205201912/05/2019
501201750/01/2017
601200760/01/2007
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Assuming your Client's Date is in mddyy format then to get your required MM/DD/YYYY

Book1
MN
1Client's DateMM/DD/YYYY
2106202001/06/2020
31204201712/04/2017
41205201912/05/2019
5501201705/01/2017
6601200706/01/2007
Sheet4
Cell Formulas
RangeFormula
N2:N6N2=IF(LEN(M2)=7,"0"&LEFT(M2,1),LEFT(M2,2))&"/"&LEFT(RIGHT(M2,6),2)&"/"&RIGHT(M2,4)
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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