just weekdays

  • Thread starter Thread starter peter the swede
  • Start date Start date
P

peter the swede

Hi all
on a spreedsheet I´ve a series with dates, where from previous date 1
day is added (i.e. C3=C2+1).
Now I wan´t to do the following:
1) check if C10 is a saturday?
2) if C10 is saturday than go to monday
3) check if C10 is sunday ?
4) if yes then add 1 day
5) if C10 is not sunday, than add 1 day

I hope you understand what I want to do

Thanks in advance
//Peter
 
Try this formula, which will work if there is a weekday in A1.
Just put this formula in B1 and copy and paste to the right.

=IF(WEEKDAY(A1+1) = 7, A1+3, IF(WEEKDAY(A1+1) = 1, A1+2, A1+1))

RBS

Hi all
on a spreedsheet I´ve a series with dates, where from previous date 1
day is added (i.e. C3=C2+1).
Now I wan´t to do the following:
1) check if C10 is a saturday?
2) if C10 is saturday than go to monday
3) check if C10 is sunday ?
4) if yes then add 1 day
5) if C10 is not sunday, than add 1 day

I hope you understand what I want to do

Thanks in advance
//Peter
 
No need to check for Sunday, the Saturday check will skip it

=C2+1+(WEEKDAY(C2)=6)*2

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

Hi all
on a spreedsheet I´ve a series with dates, where from previous date 1
day is added (i.e. C3=C2+1).
Now I wan´t to do the following:
1) check if C10 is a saturday?
2) if C10 is saturday than go to monday
3) check if C10 is sunday ?
4) if yes then add 1 day
5) if C10 is not sunday, than add 1 day

I hope you understand what I want to do

Thanks in advance
//Peter
 
One way:

=C2+1+IF(WEEKDAY(C2+1)=1,1,0)+IF(WEEKDAY(C2+1)=7,2,0)

Or you could use the WORKDAY function

=WORKDAY(C2,1) which gives the flexibility to ignore Bank Holidays, etc

Regards

Trevor


Hi all
on a spreedsheet I´ve a series with dates, where from previous date 1
day is added (i.e. C3=C2+1).
Now I wan´t to do the following:
1) check if C10 is a saturday?
2) if C10 is saturday than go to monday
3) check if C10 is sunday ?
4) if yes then add 1 day
5) if C10 is not sunday, than add 1 day

I hope you understand what I want to do

Thanks in advance
//Peter
 
but Trevor, isn´t it so, that WORKDAY isn´t a standard function of
excel?

chears
//Peter
Trevor Shuttleworth skrev:
 
It is part of the Analysis Toolpak ... which I'm sure is a standard option.

Select Tools | Add-Ins... and select Analysis Toolpak from the available
options

Regards

Trevor


but Trevor, isn´t it so, that WORKDAY isn´t a standard function of
excel?

chears
//Peter
Trevor Shuttleworth skrev:
 
Sure, it is quite straightforward.

The easy bit

=C2+1 - advance the date one day

test if the date is a Friday

WEEKDAY(C2)=6

which returns a TRUE or FALSE, which when multiplied by 2 gives 2 or 0, so
on a Friday another 2 days gets added, any other day, 0 days get added.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

dear Bob
can you explain that a little bit more ps?
 

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

Back
Top