• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Counting Total number of particular days between two dates.

VDS

Member
Dear Respected Members,

I have a small query. A Department store want to sell its old products upto a specified period.

Starting date and ending date are not fixed. For example, say starting date is 01-01-2015 end ending date is 31-03-2015. The sale is happening only on SUNDAYS.

The end result will be how many sundays are required to meet the target including and upto both dates. How this can be calculated through formula.

VDS
 
Dear Respected Members,

I have a small query. A Department store want to sell its old products upto a specified period.

Starting date and ending date are not fixed. For example, say starting date is 01-01-2015 end ending date is 31-03-2015. The sale is happening only on SUNDAYS.

The end result will be how many sundays are required to meet the target including and upto both dates. How this can be calculated through formula.

VDS
Hi,

If all you want to do is count the Sundays between two dates then you can use this. Start date in A1 and end date in A2


=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)),2)=7))

In this formula the last 7 represents Sunday so to count different days 1=Monday, 2= Tuesday etc.
 
hI,

Just to count days between two dates.

A3=INT((WEEKDAY($B$1-1)-$B$1+$B2)/7)

1 for Sunday, 2 for Monday, 3 for Tuesday, 4 for Wednesday, 5 for Thursday, 6 for Friday and 7 for Saturday
 
  • Like
Reactions: VDS
Dear All,

Brilliant answers. Great work. Still, while pressing F2 at column B4 (result column), the range displays from top to bottom in column A. Is it can be reduced ? Further, on top side displays YIELD. What does it mean ?

VDS
 
Back
Top