help with datedif function please

B

bill gras

I have names and dates in columns , every time the name changes
I need the difference from that date untill to day's date.
With the same name I need the difference between the dates eg:

A b c
1 vit 05/12/2009 datedif untill TODAY()
2 vit 20/11/2009 datedif between A1-A2
3 vit 04/07/2009 " " A2-A3
4 vit 24/06/2009 " " A3-A4
5 vit 15/06/2009 " " A4-A5
6 tom 21/11/2009 datedif untill TODAY()
7 tom 08/11/2009 datedif between A6-A7
8 tom 21/03/2009 " " A7-A8
9 tom 28/02/2009 " " A8-A9
10 swop 28/11/2009 datedif untill TODAY()
11 swop 04/11/2009 datedif between A10-A11
12 tate 28/11/2009 datedif untill TODAY()
13 tate 18/06/2009 datedif between A12-A13
14 tate 31/05/2009 " " A13-A14
15 tate 16/05/2009 " " A14-A15
16 tate 08/03/2009 " " A15-A16

and so on The names are at random sequinces

Can some one please help


bill gras
 
T

T. Valko

Try this...

Use a cell to hold today's date

E1: =TODAY()

Enter this formula in C1:

=E1-B1

Enter this formula in C2 and copy down as needed:

=IF(A2=A1,B1-B2,E$1-B2)

Format column C as General or Number
 
T

T. Valko

You'd have to do something for the last entry in the range. If the names are
in A1:A10, dates in B1:B10, when you copy the formula down to row 10 then
you get:

=IF(A11=A10,B10-B11,TODAY()-B11)

Assuming A11 and B11 are empty cells, then you get an incorrect result.
 
B

bill gras

Hi T.Valko
Thank you for your reply and your time
the formula works perfectly ,that's just what I
was looking for !
 

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