remove unwanted characters from a certain range

steve400243

Active Member
Joined
Sep 15, 2016
Messages
429
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello, on this example I am looking for the best way to remove the unwanted characters and leave just the date in a certain column. Thanks for any help.

this range would be in starting in B2, and can be any number of rows. Results could be in Column C

B9048764-001 on 10/10/17
B9048764-002 on 10/10/17
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
If your data is consistent with what you posted then try the below in C2 and copied down. Format the cells as dates.

=TRIM(RIGHT(SUBSTITUTE(B2," ",REPT(" ",255)),255))*1
 
Last edited:
Upvote 0
This formula in C2 extracts the date from the end of B2:

=MID(B2,FIND(" ",B2,FIND(" ",B2)+1)+1,99)

This is not a numeric date, it's just a string of text. If you need a numeric date, you need to convert the result to a number:

=--MID(B2,FIND(" ",B2,FIND(" ",B2)+1)+1,99)

which shows 10/10/14 as 43018, which is the serial number of the date (the number of days since 1/1/1900). Then format C2 as a date, and you'll get 10/10/17.
 
Upvote 0
Thank you Mark, I new it would be a substitute formula, but could not get it. I really appreciate your help.
 
Upvote 0
Thank you Jon, never used the =MID formula for anything before. I appreciate the formulas. Have a nice rest of your day!
 
Upvote 0
I came up with
=DATEVALUE(MID(A2, FIND("on ", A2) + 3, 999))
 
Upvote 0
This formula should also work (format the cell as a Date)...

=0+TRIM(RIGHT(A2,8))
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,999
Members
452,373
Latest member
TimReeks

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