Wildcard in IF statement - find date and reformat

aliciacarlson92

New Member
Joined
Jun 6, 2016
Messages
4
I have a "comments" column that will randomly include comments and a date string */* (eg. A1 = "del 5/20", A2 = "expected delivery 6/1", A3 = "4/7", A4= "delivery 11/01", etc.)

I want to find that date string in "comments column" and post in the adjacent column as standard date format: mm/dd/yyyy.

Thanks.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Will there only ever be one occurrence of "/" in the cell?
If not then you're probably wasting your time asking for a solution to this as it would be very complex.
 
Upvote 0
This worked on your sample:


Excel 2010
AB
1del 5/205/20/2018
2expected delivery 6/16/1/2018
34/74/7/2018
4delivery 11/0111/1/2018
Sheet3
Cell Formulas
RangeFormula
B1=DATEVALUE(TRIM(MID(" "&A1,SEARCH("/"," "&A1)-2,6))&"/18")
 
Last edited:
Upvote 0
Yes, it will include /. Sheetspread, thank you so much! Works like a charm :cool:

This worked on your sample:

Excel 2010
AB
1del 5/205/20/2018
2expected delivery 6/16/1/2018
34/74/7/2018
4delivery 11/0111/1/2018

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet3

Worksheet Formulas
CellFormula
B1=DATEVALUE(TRIM(MID(" "&A1,SEARCH("/"," "&A1)-2,6))&"/18")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,005
Messages
6,122,661
Members
449,091
Latest member
peppernaut

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