Formatting Text Data to Proper Date Format

claybwagner28

Board Regular
Joined
Sep 25, 2014
Messages
68
Office Version
  1. 365
Platform
  1. Windows
Hello, I downlaoded a source file which the dates are erronieuns typed in as text.
For example, Cell B4 has the following cell entry “Jan 7 2022” with the extra space, no comma and listed as general in format. Ultimately I am trying to change “Jan 7 2022” to “1/7/22”.
I tied to use TRIM but the file still reads it as text.

Any sugesstions? Thanks in advance!
Clay
 
Try this. =TEXT(DATE(RIGHT(TRIM(B4),4),MONTH(DATEVALUE(LEFT(TRIM(B4),3)&" 1, 2017")),MID(TRIM(B4),5,1)),"MM/DD/YY")
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Sorry, I miss read that. Check you date format and see if it's set for a four digit year
 
Upvote 0
In an absence to an answer to my previous question, at a guess try
Excel Formula:
=Substitute(B4,char(160),"")+0
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
In an absence to an answer to my previous question, at a guess try
Excel Formula:
=Substitute(B4,char(160),"")+0
Rick’s worked. Thak you for the assiatance and tips on updating my profile. Have a great day!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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