Date Formula

A

Annie

Hi

I am trying to work out a formula that will tell me the number of days
between two dates. For example, if I have a column that contains one set of
dates and another column that contains a set of dates - is there a formula I
can use to see the number of days difference between the two dates. I need
to be able to see whether a customer is 30 60 or 90 days overdue with payment.

Hope that is clear

Many thanks
 
J

Jarek Kujawa

in C1

=IF(B1-A1<=30,"<=30 days overdue",IF(AND(B1-A1>30,B1-
A1<=60),"30<overdue<=60",IF(AND(B1-A1>60,B1-
A1<=90),"60<overdue<=90",">90 days overdue"))))

copy down, then apply autofilter
 
A

Annie

I am putting in the formula exactly as suggested but keep getting #VALUE! in
the cell. I have checked it many times and it is the correct formula.
 
S

Sandy Mann

Just an alternative:

=IF(COUNT(A1:B1)<>2,"",CHOOSE(MIN(CEILING(B1-A1,30)/30,3),"Up to 30 days
overdue","31 - 60 days overdue","Over 60 days overdue"))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
S

Sandy Mann

It sounds like the *dates* you have are really text representations of dates
not real dates. Try pretending to reformat one of the cells to General and
it should show a value like 39493 in the Format cells dialog box. If it
still shows the date then it means that it is text.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
A

Annie

Thanks Sandy Mann but I did have date format in - I had made an error in the
parentheses - it's now working fine.
 

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