mardi 22 octobre 2019

Why is my TODAY function in IF formula returning a value other than 0?

I want to write the If statement below in a Google Sheet:

If today's date is greater than the payment deadline, then return the overdue payment amount. Otherwise, return 0.

I did this:

=if(F11<"=TODAY()",C11,0) + if(F12<"=TODAY()",C12,0) + if(F13<"=TODAY()",C13,0) + if(F14<"=TODAY()",C14,0) + if(F15<"=TODAY()",C15,0) + if(F16<"=TODAY()",C16,0) + if(F17<"=TODAY()",C17,0)
  • The values in column F are dates written the date format month/day/year. All of the dates in column F are greater than today's date.

  • The values in column C are dollar amounts with decimals.

First Attempt:

=if(F11<"=TODAY()",C11,0) + if(F12<"=TODAY()",C12,0) + if(F13<"=TODAY()",C13,0) + if(F14<"=TODAY()",C14,0) + if(F15<"=TODAY()",C15,0) + if(F16<"=TODAY()",C16,0) + if(F17<"=TODAY()",C17,0)

Second Attempt:

=if(F11<"TODAY()",C11,0) + if(F12<"TODAY()",C12,0) + if(F13<"TODAY()",C13,0) + if(F14<"TODAY()",C14,0) + if(F15<"TODAY()",C15,0) + if(F16<"TODAY()",C16,0) + if(F17<"TODAY()",C17,0)

Third Attempt:

=if(DATEVALUE(F11)<"TODAY()",C11,0) + if(DATEVALUE(F12)<"TODAY()",C12,0) + if(DATEVALUE(F13)<"TODAY()",C13,0) + if(DATEVALUE(F14)<"TODAY()",C14,0) + if(DATEVALUE(F15)<"TODAY()",C15,0) + if(DATEVALUE(F16)<"TODAY()",C16,0) + if(DATEVALUE(F16)<"TODAY()",C17,0)

I expect to get 0 overdue payments as all the payment deadlines are greater than today's day. Could you please help me?

Aucun commentaire:

Enregistrer un commentaire