Dates

andy_2610

Board Regular
Joined
Jan 29, 2015
Messages
168
I am a little confused how this works..
Here is my example:

Cell E3 =TEXT(DATE(2014, 1, 1)+(COLUMNS('JA Q1'!$A:D)-1)*14+19, "mm/dd/yy") =03/03/2014
Cell E4 = 60.00
Cell E5 = 80.00


Cell E6 =IF(E3>=TODAY(),E4-E5,0) =(20.00)

So basically in cell E6. Why is this returning (20.00) if my statement is greater than or equal to today's date which is 05/27/2015? Should it be returning 0?

Thanks in advance,

Andrew
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
The TEXT function returns....well....TEXT.
Even if it looks like a number or date, it's still just a TEXT string.

And believe it or not, the > and < operators consider TEXT strings to be greater than numbers/dates
So E3 > = TODAY() = TRUE

Why do you need the TEXT function in E3 ?
Why not just let it return a real date value, and use Cell formatting to make it appear in the format you like?

Change E3 to =DATE(2014, 1, 1)+(COLUMNS('JA Q1'!$A:D)-1)*14+19

OR

Change formula in E6 to convert the E3 string to a true date value
=IF(E3+0>=TODAY(),E4-E5,0)
 
Upvote 0
The value in E3 is Text and not a serial date.

Try this in E3
=DATE(2014, 1, 1)+(COLUMNS('JA Q1'!$A:D)-1)*14+19

Format E3 with any date format you like.
 
Upvote 0
The TEXT function returns a Text value, not a Date value.

Do you need to TEXT function at all? Why not just use:
Code:
[COLOR=#333333]=DATE(2014, 1, 1)+(COLUMNS('JA Q1'!$A:D)-1)*14+19[/COLOR]
and format cell E3 as a date in "mm/dd/yyyy" format?

Otherwise, you will need to convert it back to a date in E6 like this:
Code:
[COLOR=#333333]=IF(DATEVALUE(E3)>=TODAY(),E4-E5,0)[/COLOR]
 
Upvote 0
You are getting the correct result. From your question, it sounds like you want to reverse the position of E3 and Today(). The formula below would yield 0.

Cell E6 =IF(TODAY()>=E3,E4-E5,0)
 
Upvote 0

Forum statistics

Threads
1,213,544
Messages
6,114,249
Members
448,556
Latest member
peterhess2002

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