Date formatting not working

ianharper68

New Member
Joined
May 16, 2024
Messages
45
Office Version
  1. 2021
Platform
  1. MacOS
Ok I do not know what is happening but for some reason I am completely unable to format a column of cells? I have deleted the column and re-added it and still it wont format? I have cleared formatting, saved the worksheet, closed it and re-opened it, still won't format?

Can anybody help?

It is the "Date Goods In" column and if the date format doesn't work then neither does my calculation in column "Chargeable Days"

PE0001 - EDCR Master Worksheet copy.xlsm
ABACADAE
7Date Goods InDate Goods outFree DaysChargeable Days
815/12/2430/01/20253#VALUE!
930/01/20253 
1030/01/20253 
1130/01/20253 
1230/01/20253 
1330/01/20253 
1430/01/20253 
1530/01/20253 
MASTER SHEET
Cell Formulas
RangeFormula
AC8:AC15AC8=Dashboard!$Q$24
AD8:AD15AD8=$AD$3
AE8:AE15AE8=IF(AB8="","",AC8-AB8-AD8)
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
See all those little triangles in the upper right-corner of all the cells in column AC?
That indicates that all those entries are actually text and not dates.
Re-format column AC to a date format, and then re-enter those values (you can do all at once using "Text to Columns").
Once there are valid dates in column AC, then you can use that column in mathematical computations.
 
Upvote 0
Column AC is not the issue that is in date format. The problem column is AB ... even if I drag a cell from AC to AB it is fine and the formula works and I get -3. But if I try and change the date in the same cell it reverts back to the previous

Here is the screen shot of AC with its format:

Screenshot 2024-12-10 at 14.00.54.png


Here is a screen shot of the copied cells from AC to AB .... as you can see the calculation works fine as Date goos In - Date Goods out - 3 days = -3 which is correct:
Screenshot 2024-12-10 at 14.04.30.png


Now here it the same cells in AB showing they are in fact formatted to the date correctly:

Screenshot 2024-12-10 at 14.06.26.png


However as soon as I try and change the date the formatting is lost (although it is showing as correctly formatted in cell format)?

Screenshot 2024-12-10 at 14.09.27.png
 
Upvote 0
I am a bit confused by your explanation (I am not quite sure what you are trying to tell me).

But allow me to explain a few things, and see if it helps you pinpoint your issue.

In Excel, all valid dates are really stored as numbers, specifically the number of days since 1/0/1900.
You can easily see this by entering a valid date in any blank cell, and then converting the format of the cell to Number or General.
Then you will see the date as Excel sees it.
So if you enter "30/01/2025" into any blank cell and change the format to Number or General, you should see 45687.

That is helpful to know. That means that you can easily verify if an entry is text or a valid date entry by using the ISNUMBER function.
In your workbook, if you enter the following formulas in any blank cells, they should ALL return TRUE.
Excel Formula:
=ISNUMBER(AB8)
=ISNUMBER(AC8)
=ISNUMBER(AD8)
If any of them returns FALSE, you are dealing with a Text entry, and not a valid Numeric/Date entry, and you won't be able to do any math on it until you convert it.
And simply changing the format of cells with existing values in them will NOT make that change! The data needs to physically be re-entered.

Note for values that you are pulling by formula from other sheets (i.e. =Dashboard!$Q$24), changing the format of the cell and re-entering the formula will not fix it, because the issue is at the source (the Dashboard) sheet. So you would either need to fix the issue with those values right on the Dashboard sheet, or convert the value to a valid date by updating that formula above to this:
Excel Formula:
=DATEVALUE(Dashboard!$Q$24)
The DATEVALUE function will convert a valid looking date entered as text to a valid date value.
 
Upvote 0
Right so here is the conundrum? IF I open the file on my MAC the formatting and the calculations work absolutely FINE, however due to the drawbacks of excel for MAC with VBA and Macros, I also have Windows 11 on a Parallels Virtual Machine. When I open the same file in Excel in Windows 11 it won't work EXCEPT ONE CELL .....

This is Mac:
Screenshot 2024-12-10 at 14.26.37.png


Same File in Windows the only cell that works is AB12:

Screenshot 2024-12-10 at 14.35.36.png


BUT here is the kicker .... IF I copy that cell to all others it again seems to work fine UNTIL you try to change the date and then it reverts back to the old unformatted date??

Screenshot 2024-12-10 at 14.38.03.png


It certainly is puzzling
 
Upvote 0
On the computer it is not working, it seems to suggest that it is not recognizing one of those columns as a valid date/number entry.
Pick one of those rows that is getting the #VALUE error, and check the value in all three columns used by the formula returning the error (AB, AC, and AD) like I showed in my last post, and see if they all return TRUE or any return FALSE.

It is important to do this on the computer returning the error, and on the row returning the error.
So if cell AE9 is reporting the "#VALUE error, you want to check:
Excel Formula:
=ISNUMBER(AB9)
=ISNUMBER(AC9)
=ISNUMBER(AD9)
Note that if it works on some machines and not others, I suspect there may be different setting/configurations causing issues, i.e. default date formats and regional settings.
 
Upvote 0
I suspect your regional settings are US on the VM. So 15/1/24 would not be a valid date (but 1/15/24 would).
 
Upvote 0
Solution
I am a bit confused by your explanation (I am not quite sure what you are trying to tell me).

But allow me to explain a few things, and see if it helps you pinpoint your issue.

In Excel, all valid dates are really stored as numbers, specifically the number of days since 1/0/1900.
You can easily see this by entering a valid date in any blank cell, and then converting the format of the cell to Number or General.
Then you will see the date as Excel sees it.
So if you enter "30/01/2025" into any blank cell and change the format to Number or General, you should see 45687.

That is helpful to know. That means that you can easily verify if an entry is text or a valid date entry by using the ISNUMBER function.
In your workbook, if you enter the following formulas in any blank cells, they should ALL return TRUE.
Excel Formula:
=ISNUMBER(AB8)
=ISNUMBER(AC8)
=ISNUMBER(AD8)
If any of them returns FALSE, you are dealing with a Text entry, and not a valid Numeric/Date entry, and you won't be able to do any math on it until you convert it.
And simply changing the format of cells with existing values in them will NOT make that change! The data needs to physically be re-entered.

Note for values that you are pulling by formula from other sheets (i.e. =Dashboard!$Q$24), changing the format of the cell and re-entering the formula will not fix it, because the issue is at the source (the Dashboard) sheet. So you would either need to fix the issue with those values right on the Dashboard sheet, or convert the value to a valid date by updating that formula above to this:
Excel Formula:
=DATEVALUE(Dashboard!$Q$24)
The DATEVALUE function will convert a valid looking date entered as text to a valid date value.
So I carried out the ISNUMBER function as you said.

So here is the results with the cell copied from the single cell that seemed to work and I get all TRUE:
Screenshot 2024-12-10 at 14.50.51.png


UNTIL I try to manually change the date: then it reverts to false:
Screenshot 2024-12-10 at 14.53.53.png


So the formatting is not working as it should??
 

Attachments

  • Screenshot 2024-12-10 at 14.45.52.png
    Screenshot 2024-12-10 at 14.45.52.png
    12.4 KB · Views: 0
  • Screenshot 2024-12-10 at 14.46.08.png
    Screenshot 2024-12-10 at 14.46.08.png
    12.2 KB · Views: 0
Upvote 0
Did you see Rory's reply?
 
Upvote 0
I suspect your regional settings are US on the VM. So 15/1/24 would not be a valid date (but 1/15/24 would).
Thank you for some reason the Mac and Parallels hadn't updated although it was showing it the correct time zone ... all fixed now :) Thanks RoryA :)
 
Upvote 0

Forum statistics

Threads
1,224,771
Messages
6,180,860
Members
453,003
Latest member
SalihZekiKoni

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