View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Count Weekdays and Weekends separate & < a given cell.

Hi again,

Am Mon, 20 Aug 2018 20:15:49 +0200 schrieb Claus Busch:

if you have a zero in column A the weekday is Saturday and will be
counted.
Change the formula for weekends:
=SUMPRODUCT((WEEKDAY(A$2:A$32,2)5)*(A2:A320)*D$2 :D$32)/SUMPRODUCT((WEEKDAY(A$2:A$32,2)5)*(A2:A320))


for the sum you don't need to check in column A is greater than 0
This will be enough:
=SUMPRODUCT((WEEKDAY(A$2:A$32,2)5)*D$2:D$32)/SUMPRODUCT((WEEKDAY(A$2:A$32,2)5)*(A2:A320))


Regards
Claus B.
--
Windows10
Office 2016