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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
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
del 5/20
expected delivery 6/1
4/7
delivery 11/01

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]5/20/2018[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]6/1/2018[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]4/7/2018[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]11/1/2018[/TD]

</tbody>
Sheet3

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B1[/TH]
[TD="align: left"]=DATEVALUE(TRIM(MID(" "&A1,SEARCH("/"," "&A1)-2,6))&"/18")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,983
Messages
6,175,779
Members
452,668
Latest member
mrider123

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