![]() |
Need a formula to count the fridays between two dates
example:
cell F1 is the start date 07-01-06 cell E1 is the end date 07-29-06 cell F3 is the answer 4 I just need to count the fridays between two dates |
Need a formula to count the fridays between two dates
Try =SUM(IF(WEEKDAY(F2-1+ROW(INDIRECT("1:"&TRUNC(F3-F2)+1)))=6,1,0)) It's an array so need to press Crtl + ****f + enter to work VBA Noob -- VBA Noob ------------------------------------------------------------------------ VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833 View this thread: http://www.excelforum.com/showthread...hreadid=570107 |
Need a formula to count the fridays between two dates
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(F1&":"&E1)))=6))
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "tiq" wrote in message ... example: cell F1 is the start date 07-01-06 cell E1 is the end date 07-29-06 cell F3 is the answer 4 I just need to count the fridays between two dates |
Need a formula to count the fridays between two dates
Just because I like to make things difficult =) =IF(6-WEEKDAY(F1)-1, QUOTIENT((E1-F1-(6-WEEKDAY(F1))),7)+1, QUOTIENT((E1-F1-6), 7)+1) -- Bearacade ------------------------------------------------------------------------ Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016 View this thread: http://www.excelforum.com/showthread...hreadid=570107 |
Need a formula to count the fridays between two dates
Thanks. I used that and it worked for me. I was pretty amazed, I'm still
trying to figure it out. "VBA Noob" wrote: Try =SUM(IF(WEEKDAY(F2-1+ROW(INDIRECT("1:"&TRUNC(F3-F2)+1)))=6,1,0)) It's an array so need to press Crtl + ****f + enter to work VBA Noob -- VBA Noob ------------------------------------------------------------------------ VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833 View this thread: http://www.excelforum.com/showthread...hreadid=570107 |
All times are GMT +1. The time now is 02:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com