View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default Calculate Payment Days and Date

On Thu, 17 Mar 2011 04:50:47 -0700 (PDT), Paul Black wrote:

Thanks Ron,

I have changed the cell "D1" to "D5" for the first date and tried to
adapt the formula to start in cell "D6" accordingly but for some
reason it doesn't work.
This is what I am using ...
=WORKDAY(DATE(YEAR($D6),MONTH($D6)+ROWS(6:6),DAY( $D6))+5,-5)


Paul,

In addition to my previous post, I neglected to ask you how you want to treat a start date such as 31 May 2011?

Is the next payment due on 30 Jun or on 1 Jul?

Assuming it will be due on 30 June, I would suggest this much shorter formula:

=WORKDAY(EDATE($D$1,ROWS($1:1))+1,-1)

$D$1 refers to the cell containing the FIRST date. That is all you need to change if you move that to another cell.

e.g. with D5 as the first date:

=WORKDAY(EDATE($D$5,ROWS($1:1))+1,-1)

Again, there is the optional Holidays argument that can be used.

By the way, AB's suggestion will give incorrect dates if the start date is at the end of the month.