# If Statements and Difference between Dates

1. ## If Statements and Difference between Dates

Hey,

I am building a spreadsheet to track different dates along our sales process. Unfortunately I am stumped on a formula so any help would be great!
The problem I am having is the "Value if True" statement, everything is below-

=IF(G2>BB1, =G2-BB1, "Past Due")

Logical Test
G2 > BB1 (Greater)
G2-Date of item within contract
BB1-This is "=Today()" so it resets to today's date

Value if True
I would like to have the difference of days between "Todays Date" and the Date from the contract
Example: if it is May 17 today, and my item is due May 18, it would display 1 day

Value if False
If G2 is greater than Todays Date, I would like it to read "Past Due"

Any thoughts on this?
Thanks

2. ## Re: If Statements and Difference between Dates

You need to take the equals sign out of the Value if True area. It should be

``Please Login or Register  to view this content.``
That will do the math I believe you are after.

Hope this helps.

3. ## Re: If Statements and Difference between Dates

let A1 contain =today()

let the due date be in column G

so for row 2 it would be

=if(g2>=\$a\$1,g2-\$a\$1,"Past Due by "&\$a\$1-g2&" days")

There are currently 1 users browsing this thread. (0 members and 1 guests)