If Formula using greater than Date

James8761

Board Regular
Joined
Apr 24, 2012
Messages
161
Office Version
  1. 365
Platform
  1. Windows
Hi,
I'm trying to do something that I feel should be simple but I can't get the formula correct.

The highlighted formula is in Cell FS17. I'm trying to get the answer to be £417 (£90000/216) but it keeps saying £0.
Any ideas please?

1737662689089.png
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
If you enter these two formulas in any blank cells, what do they return?
=ISNUMBER(FS11)
=ISNUMBER(T17)


If either one (or both) of those formulas return FALSE, then those entries are in fact text entries, and NOT valid date entries, so you cannot do date math on them straight up without either fixing the entries, or converting them to valid dates in the formula.
 
Upvote 0
If you enter these two formulas in any blank cells, what do they return?
=ISNUMBER(FS11)
=ISNUMBER(T17)


If either one (or both) of those formulas return FALSE, then those entries are in fact text entries, and NOT valid date entries, so you cannot do date math on them straight up without either fixing the entries, or converting them to valid dates in the formula.
Hmm... thank you, interesting.
They are indeed different, top one TRUE, bottom one FALSE.
When I click on format cells though they are both formatted as such

1737663494694.png
 
Upvote 0
If you enter these two formulas in any blank cells, what do they return?
=ISNUMBER(FS11)
=ISNUMBER(T17)


If either one (or both) of those formulas return FALSE, then those entries are in fact text entries, and NOT valid date entries, so you cannot do date math on them straight up without either fixing the entries, or converting them to valid dates in the formula.
I just entered the DATEVALUE in a blank column and all seems to work. Thanks for the input.
 
Upvote 0
Checking the format of the cell really doesn't help. You can apply a custom format to any cell, but they only affect valid numeric entries.
If you try to apply them to text entries, they do not do anything).
(Note that dates are really just numbers, specifically the number of data since 1900 - you can see this by changing the format of any date cell to General, and see the number it shows you!).

Note that you do not need a separate column. You can handle it right in the formula, i.e.
if T17 was the cell entered as text, then your formula could start:
Excel Formula:
=IF($FS$11>DATEVALUE($T17),...
 
Upvote 0
Checking the format of the cell really doesn't help. You can apply a custom format to any cell, but they only affect valid numeric entries.
If you try to apply them to text entries, they do not do anything).
(Note that dates are really just numbers, specifically the number of data since 1900 - you can see this by changing the format of any date cell to General, and see the number it shows you!).

Note that you do not need a separate column. You can handle it right in the formula, i.e.
if T17 was the cell entered as text, then your formula could start:
Excel Formula:
=IF($FS$11>DATEVALUE($T17),...
Thank you for that, always good to learn something new.
 
Upvote 0

Forum statistics

Threads
1,226,074
Messages
6,188,727
Members
453,494
Latest member
Alt F11

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