=MID to DATEVALUE

prw79

New Member
Joined
Aug 5, 2022
Messages
18
Office Version
  1. 2019
Platform
  1. Windows
Hello all,

I have a cell that is automatically named after its sheet name with the following formula: =MID(CELL("filename";A1);FIND("]";CELL("filename";A1))+1;255)
The sheet name is named after a date like "vr-2-sep".
However excel doesn't recognize it as a date. So i would like to copy the result into another cell and format it as a date value so i can link it with other date values somewhere else in the worksheet.

hope someone has a fix for this, thanks
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
What language are you using? I do not recognize "vr-2-sep" as a date. What date is that supposed to be?

The DATEVALUE function will convert a text string to a date, but it must be in a format that Excel can recognize. Otherwise you will need a more customized function.
 
Upvote 0
What language are you using? I do not recognize "vr-2-sep" as a date. What date is that supposed to be?

The DATEVALUE function will convert a text string to a date, but it must be in a format that Excel can recognize. Otherwise you will need a more customized function.
it is friday september the 2nd in Dutch, but excel is English. The sheetname does not accept / or : signs, that's why it is in that format
 
Upvote 0
The double negative coerces the text to a number; the result is formatted as a date.

Date and Time 3.xlsm
ABC
1
2vr-2-sep2-Sep-222-Sep-22
3vr-12-sep12-Sep-2212-Sep-22
4
4e
Cell Formulas
RangeFormula
B2:B3B2=--(MID(A2,FIND("-",A2)+1,99))
C2:C3C2=DATEVALUE(MID(A2,FIND("-",A2)+1,99))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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