Convert cell into real date format with a formula in an excel report
When I combine the day and the month to get the full date with the year, excel is not considering as a “date” but as a “text” no matter if I change the format in different ways, the cell stays as “text”. This has no impact in a lot of things but if I want to use this cell to calculate the date, I will not get the correct result. To remediate, I will need to convert the cell with a formula.
When I use the formula ?
To convert the cell in which I combine the day and month into real “date” format.
How to use the formula ?
The formula in this topic is with "," so depending of the operating system of your PC, the formula should have ";" instead of ",".
How are the formula ?
DATEVALUE()
IF()
MONTH()
YEAR()
TODAY()
=DATEVALUE(IF(A2="","",IF(A2<10,0,"")&A2&"/"&IF(MONTH(DATEVALUE(B2&"1"))<10,0,"")&MONTH(DATEVALUE(B2&"1"))&"/"&YEAR(TODAY())))
NOTE: to display the date, format them to “short date”.
Interesting Topics
-
Be successfully certified ITIL 4 Managing Professional
Study, study and study, I couldn’t be successfully certified without studying it, if you are interested...
-
Be successfully certified ITIL 4 Strategic Leader
With my ITIL 4 Managing Professional certification (ITIL MP) in the pocket, it was time to go for the...
-
Hide visual and change background color based on selection
Some small tricks to customize the background colour of a text box...
-
Stacked and clustered column chart or double stacked column chart
In excel, I use a lot the combination of clustered and stacked chart...