Calculate current time + 7 hours and skipping weekends

E

Eric

Let say is Friday at 8:00 PM. I want to add 7 hours to it and skip all
hours in Saturday and Sunday. Start adding calulating again at Monday
at 12:00 AM (Monday Morning). Any help in this would be appricated. I
have reviewed and reviewed things trying to figure this out.

Eric
 
R

Ron Rosenfeld

Let say is Friday at 8:00 PM. I want to add 7 hours to it and skip all
hours in Saturday and Sunday. Start adding calulating again at Monday
at 12:00 AM (Monday Morning). Any help in this would be appricated. I
have reviewed and reviewed things trying to figure this out.

Eric


Try this:

=WORKDAY(A1+TIME(A2,,)-1,1)+MOD(A1+TIME(A2,,),1)

with Date and time in A1; and the number of hours to add in A2

This formula is the same:

=WORKDAY(A1+A2/24-1,1)+MOD(A1+A2/24,1)

--ron
 
E

Eric

that worked. Thanks. I have to spend some time trying to figure this
out. It makes my head hurt right now so I look at it again tomorrow.

Props to you.
 
R

Ron Rosenfeld

that worked. Thanks. I have to spend some time trying to figure this
out. It makes my head hurt right now so I look at it again tomorrow.

Props to you.

You're welcome.

By the way, the TIME function is set up to only take integer hours, and its
output is a maximum of 23 hours -- never more.

If you want to use fractional hours, or more than 24 hours, use the second
variation I posted.
--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top