if statement

B

BrianM

I have the following formula:

if(date-TODAY()<=7,"Payment due","")

The problem is when today's date falls after the first date the result is a
negative number and it returns "payment due" since it's less than 7 even
though the payment has been made. A solution (since I'm a new user, not
likely to be the best one) might be specifying a range of from 1-7 days but I
don't know how to do that.
 
D

David McRitchie

Hi Brian,
As asked
=IF(AND(date-TODAY()<=7, date<TODAY()),"Payment due","")

You would be better off checking a cell or flag to tell if the payment
has been made for this period in addition or before checking the
difference. .
 
B

BrianM

Yes, that would be good but I have an array of 9 rows representing 9
payment-due dates. Complicating matters a bit is the fact that there are ten
other spreadsheets that have the same issue. Each spreadsheet (each one
representing an owned property) links to a summary of owned properties. I
want to create a link from each property spreadscheet to the summary
spreadsheet which, among other things, shows that a payment is coming up. By
the way, payment dates are different for each so having this kind of alert
would be quite useful.

Speaking or the array. the perfect formula would loop from each payment
date - TODAY() pair and report whether a payment was due. Since I'm only
working with one column of 9 cells and, if I understand how arrays work, I
need another column to make the array formula work, that doesn't appear to be
an option.

Thank you for your suggestion...
David McRitchie said:
Hi Brian,
As asked
=IF(AND(date-TODAY()<=7, date<TODAY()),"Payment due","")

You would be better off checking a cell or flag to tell if the payment
has been made for this period in addition or before checking the
difference. .
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

BrianM said:
I have the following formula:

if(date-TODAY()<=7,"Payment due","")

The problem is when today's date falls after the first date the result is a
negative number and it returns "payment due" since it's less than 7 even
though the payment has been made. A solution (since I'm a new user, not
likely to be the best one) might be specifying a range of from 1-7 days but I
don't know how to do that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top