Home » excel » How to standardize the text function in Excel?

How to standardize the text function in Excel?

Posted by: admin May 14, 2020 Leave a comment


=text(5/7/19,[Windows date format]) depends on the computer you are opening the Excel file from. For instance: =text(5/7/19, "mm/dd/yy") works on the company computer because that’s how the windows formatted the date, but in my computer, it has to be =text(5/7/19, "dd/mm/yy") else it will return a different value and using other functions such as =datevalue(text(5/7/19, "mm/dd/yy") will return a #VALUE! error on my home computer. This is not good because it is very variable when the file is being moved around computers. How to standardize this?

How to&Answers:

So what about:


Or reference a cell where you have put your date.


Unfortunately I don’t think it is possible – see the this link


Problem: The value in the date_text argument is not in sync with the system’s date and time settings*

If your system date and time settings follow the mm/dd/yyyy format,
then a formula such as =DATEVALUE(“22/6/2000”) will result in a #VALUE! error. But the same formula will display the correct value when the system’s date and time is set to dd/mm/yyyy format.

Solution: Make sure that your system’s date and time settings (both Short time and Long time) matches the date format in the
date_text argument.

I think the only solution is to make sure that your date is in the valid (i.e. recognised by the system) date format before any other function (like DATEVALUE) is applied.

It will be easy to achieve if your function is simply =text(5/7/19,[Windows date format]). You can reference your cell field (e.g. =[@Date]) and format a given cell using an “universal” date format (the ones that start with * sign).

enter image description here

However, if you are combining =text(5/7/19,[Windows date format]) with some other formula (e.g. when you want to display a full sentence like A very important event happened on 5/7/19) then, unfortunately, cell format won’t save you here and we’re out of solutions. In such case the end user would need to manually modify the date cell in order to make it recognisable.