View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
elusiverunner
 
Posts: n/a
Default Can this be done

Hi JMB

Do you have an email address to which I could send you the table to look at ?
--
Steven.

In God we trust, all others we virus scan.


"JMB" wrote:

Never mind, that formula won't work 100% of the time (such as when the
interval is exactly six months).

It sounds like you first need to determine what the last service date was.
Assuming A1:A20 is your weekly dates, B1:B20 is the mileage readings for your
service dates, you could try entering in A22 (format the cell as a date)

=SUMPRODUCT(--(B1:B20=MAX(B1:B20)),A1:A20)

to find the last service date. In B22 enter the number of months (such as
6). In C22 enter

=DATE(YEAR(A22),MONTH(A22)+B22,DAY(A22))

to find the next service date (6 months from the last service date)

and (modified after seeing the good suggestions others posted)

=DATEDIF(TODAY(),C22,"M")&" Months, "&INT(DATEDIF(TODAY(),C22,"MD")/7)&"
Weeks, "&ROUND(MOD(DATEDIF(TODAY(),C22,"MD")/7,1)*7,0)&" Days"

to find the number of Months, Weeks, and Days between today's date and the
next service date. Change range references as necessary.




"JMB" wrote:

Assuming the last service date is in A1, the number of months until the next
service date is in B1, enter in C1

=DATE(YEAR(A1),MONTH(A1)+B1,DAY(B1))

to get the next service date

and in D1
=DATEDIF(TODAY(),C1,"M")&" Months,
"&INT((EOMONTH(TODAY(),0)-TODAY()+DAY(C1))/7)&" Weeks,
"&ROUND(MOD((EOMONTH(TODAY(),0)-TODAY()+DAY(C1))/7,1)*7,0)&" Days"

to get the number of Months,Weeks,Days. Try it out and see if it gives the
results you want.


"elusiverunner" wrote:

I have a worksheet where I enter data on a weekly basis - (car servicing) at
present I have been able to total the distance travelled since the last
serviced. What I would like to be able to do is display how much time - (in
months, weeks and days) till the next service interval, knowing that each
service interval is three months or six months hence. In other words count
down the time from previous service to next service.

Can someone, firstly tell me if it can be done and secondly how can it be
done ??
--
Steven.

In God we trust, all others we virus scan.