ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date format (https://www.excelbanter.com/excel-programming/301447-date-format.html)

robboyd \(removethis\) @hotmail.com

Date format
 
I need to be able to insert a date into one row and then
link it to anothr row only I need it to be able to use
calender days so that I can not count work days i.e.
weekends for scheduling purposes. Please help or tell me
it can't be done. Thanks a million.

john

Date format
 
I would think you could calculate the difference by
adjusting the two dates to be the same day of the week
(via the weekday function), calculating the difference and
dividing by 7 to get the # of weekends, subtracting 2*
that from the difference, and then adding back what your
adjustment was.

John


-----Original Message-----
I need to be able to insert a date into one row and then
link it to anothr row only I need it to be able to use
calender days so that I can not count work days i.e.
weekends for scheduling purposes. Please help or tell me
it can't be done. Thanks a million.
.


No Name

Date format
 
if the two dates are in cells b5 and b6 i think this
works. i hope you do not want to try to exclude holidays
though!

John

ps this calculates 4 days between fridays - if you want
that answer to be 5 take out the "-1" on line 2.

=B6-B5-(WEEKDAY(B6,2)-WEEKDAY(B5,2))-2*(B6-B5-(WEEKDAY
(B6,2)-WEEKDAY(B5,2)))/7+(WEEKDAY(B6,2)-WEEKDAY(B5,2))-1-IF
(WEEKDAY(B6,2)=7,2,IF(WEEKDAY(B6,2)=6,1,0))

-----Original Message-----
I need to be able to insert a date into one row and then
link it to anothr row only I need it to be able to use
calender days so that I can not count work days i.e.
weekends for scheduling purposes. Please help or tell me
it can't be done. Thanks a million.
.



All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com