WORKDAY() and probably more

E

Epinn

Bob,

Welcome to my new thread.

Bob's formula for the last work day of the current month (brought over from another thread WEEKDAY is
this:-

=WORKDAY(DATE(YEAR(A1),MONTH(A1)+1,1),-1)

Looks like this is similar to the second formula below which I like.

I was "intimidated" by the first one below. It was almost three lines on my screeen. If I don't need to grasp EOMONTH(), I prefer not. I have to have ATP (Analysis Toolpak) to use WORKDAY(), right? My system told me #N/A!, so I have to install it.

***********************************************************************************
a.. Last workday of the current month:
=IF(WEEKDAY(EOMONTH(TODAY(),0))=6,EOMONTH(TODAY(),0)-1,IF(WEEKDAY(EOMONTH(TODAY(),0))=1,EOMONTH(TODAY(),0)-2,EOMONTH(TODAY(),0)))

or

=WORKDAY(DATE(YEAR(TODAY()),MONTH(TODAY())+1,1),-1,Holidays)

Source: http://www.officearticles.com/excel/date_formulas_and_functions_in_microsoft_excel.htm

If link broken try this ...... http://tinyurl.com/mrzcc

****************************************************************************

I will stay tuned.

Epinn
 
B

Bob Phillips

Hi Epinn,

I wonder what delights you will bring up here <g>

The EOMONTH formula you give below is wrong, it should be

=IF(WEEKDAY(EOMONTH(TODAY(),0))=7,EOMONTH(TODAY(),0)-1,IF(WEEKDAY(EOMONTH(TO
DAY(),0))=1,EOMONTH(TODAY(),0)-2,EOMONTH(TODAY(),0)))

which can be shortened to

=EOMONTH(TODAY(),0)-IF(WEEKDAY(EOMONTH(TODAY(),0))=7,1,IF(WEEKDAY(EOMONTH(TO
DAY(),0))=1,2,0))

which I think helps see what is happening, or even shorter at

=EOMONTH(TODAY(),0)-(WEEKDAY(EOMONTH(TODAY(),0))={1,7})*({2,1})

As you say you need ATP for WORKDAY to function, but you probably have it
installed, just not loaded. Goto Tools>Add-Ins..., and check Analysis
Toolpak.

Bob,

Welcome to my new thread.

Bob's formula for the last work day of the current month (brought over from
another thread WEEKDAY is
this:-

=WORKDAY(DATE(YEAR(A1),MONTH(A1)+1,1),-1)

Looks like this is similar to the second formula below which I like.

I was "intimidated" by the first one below. It was almost three lines on my
screeen. If I don't need to grasp EOMONTH(), I prefer not. I have to have
ATP (Analysis Toolpak) to use WORKDAY(), right? My system told me #N/A!, so
I have to install it.

****************************************************************************
*******
a.. Last workday of the current month:
=IF(WEEKDAY(EOMONTH(TODAY(),0))=6,EOMONTH(TODAY(),0)-1,IF(WEEKDAY(EOMONTH(TO
DAY(),0))=1,EOMONTH(TODAY(),0)-2,EOMONTH(TODAY(),0)))

or

=WORKDAY(DATE(YEAR(TODAY()),MONTH(TODAY())+1,1),-1,Holidays)

Source:
http://www.officearticles.com/excel/date_formulas_and_functions_in_microsoft_excel.htm

If link broken try this ...... http://tinyurl.com/mrzcc

****************************************************************************

I will stay tuned.

Epinn
 
E

Epinn

Bob,

Sorry, I disappointed you. <g> I am glad that I didn't spend hours trying to analyze what they put on the web site. May be the info there is not so reliable after all??

Yes, I agree that I only need to load. I did it once for another function and that was what I had in mind even though I said "installed." I should get some sleep.

Wow! You can shrink the formula to half!! However, I don't have a clue how to decipher it. Regarding the last (third) formula, this is the first time I see an equal sign in a formula without "if" present. I don't know if that little dash means minus and I don't understand the array constants. But I don't want to take up your time explaining it to me as I prefer you help me on something else that may need more of my attention in the future. You know, I don't feel like "bugging" you all day long. I'll just keep this formula in my bag for now.

Cheers,

Epinn

Hi Epinn,

I wonder what delights you will bring up here <g>

The EOMONTH formula you give below is wrong, it should be

=IF(WEEKDAY(EOMONTH(TODAY(),0))=7,EOMONTH(TODAY(),0)-1,IF(WEEKDAY(EOMONTH(TO
DAY(),0))=1,EOMONTH(TODAY(),0)-2,EOMONTH(TODAY(),0)))

which can be shortened to

=EOMONTH(TODAY(),0)-IF(WEEKDAY(EOMONTH(TODAY(),0))=7,1,IF(WEEKDAY(EOMONTH(TO
DAY(),0))=1,2,0))

which I think helps see what is happening, or even shorter at

=EOMONTH(TODAY(),0)-(WEEKDAY(EOMONTH(TODAY(),0))={1,7})*({2,1})

As you say you need ATP for WORKDAY to function, but you probably have it
installed, just not loaded. Goto Tools>Add-Ins..., and check Analysis
Toolpak.

Bob,

Welcome to my new thread.

Bob's formula for the last work day of the current month (brought over from
another thread WEEKDAY is
this:-

=WORKDAY(DATE(YEAR(A1),MONTH(A1)+1,1),-1)

Looks like this is similar to the second formula below which I like.

I was "intimidated" by the first one below. It was almost three lines on my
screeen. If I don't need to grasp EOMONTH(), I prefer not. I have to have
ATP (Analysis Toolpak) to use WORKDAY(), right? My system told me #N/A!, so
I have to install it.

****************************************************************************
*******
a.. Last workday of the current month:
=IF(WEEKDAY(EOMONTH(TODAY(),0))=6,EOMONTH(TODAY(),0)-1,IF(WEEKDAY(EOMONTH(TO
DAY(),0))=1,EOMONTH(TODAY(),0)-2,EOMONTH(TODAY(),0)))

or

=WORKDAY(DATE(YEAR(TODAY()),MONTH(TODAY())+1,1),-1,Holidays)

Source:
http://www.officearticles.com/excel/date_formulas_and_functions_in_microsoft_excel.htm

If link broken try this ...... http://tinyurl.com/mrzcc

****************************************************************************

I will stay tuned.

Epinn
 
B

Bob Phillips

Bob,
Sorry, I disappointed you. <g> I am glad that I didn't spend hours
trying to analyze what they put on the web site. May be the info there
is not so reliable after all??


The problem was that it was testing the last day for Friday or Sunday, it
should be testing for Saturday or Sunday.

Wow! You can shrink the formula to half!! However, I don't have a
clue how to decipher it. Regarding the last (third) formula, this is the
first time I see an equal sign in a formula without "if" present.


I doubt that Epinn, it is just testing a condition. I think you will have
seen that many times in SUMPRODUCT

=SUMPRODUCT((rng1="A")*(rng2="B"))

so as before it is just getting a TRUE/FALSE result which is being coerced
by the * operator (again, just like you have seen in SUMPRODUCT). The
different thing here is I test against two value {1,7} and then using two
multipliers {2,1} which will get a value depending upon the day of the week
that the last day falls on.
I don't know if that little dash means minus and I don't understand the
array constants. But I don't want to take up your time explaining it to
me as I prefer you help me on something else that may need more of
my attention in the future. You know, I don't feel like "bugging" you all
day long. I'll just keep this formula in my bag for now.

I fear you are getting information overload now mate <g>. That dash
certainly does mean minus, The formula just calculates the last date of the
month, then calculates if that last day is a Saturday or Sunday and
calculates the number of days to subtract if so, and subtracts them

=Get_end_of_month_date - adjustment

where

adjustment = If(day_of_end_of_month_date = Sat or Sun, return 1 or 2, else
return 0)
 
B

Biff

What happens if you don't want to or can't use ATP functions? Then it gets
much more complicated!

I'm sure there is a better way to do this but this is the first thing that
came to my mind. This is an array formula and it also demonstrates the 0th
day of the month that I mentioned in the "Weekday" thread:

=MAX(IF(WEEKDAY(ROW(INDIRECT(DATE(YEAR(A1),MONTH(A1),1)&":"&DATE(YEAR(A1),MONTH(A1)+1,0))),2)<6,ROW(INDIRECT(DATE(YEAR(A1),MONTH(A1),1)&":"&DATE(YEAR(A1),MONTH(A1)+1,0)))))

Biff
 
B

Bob Phillips

I gave an alternate solution non-ATP earlier

=DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)
-5))

and non-array

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Bob Phillips

I love his work, and I gracefully acknowledge his skill and expertise <vbg>

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Bob Phillips

I don't understand Biff's shortest formula though.

"5" means there are five work days, right? Can't figure out minus 7?
7 is Saturday or 7 means 7 days in a week. I don't want to torture
my brain too much now ......


It.s nothing to do with Saturday. What is happening is that the formula
first calculates the end of monthe date, and then takes 7 off of that to go
back into the month. Thus, if the last day is a Saturday, it will take you
back to the previous Saturday, Tuesday goes to Tuesday. WORKDAY is then
invoked with that date + 5 days which MUST take you to the last working days
(i.e 5 on Sat is Fri, 5 on Tue is Tue).

I won't worry about the non-ATP formulae as I want to prevent a short-circuit.



http://www.cpearson.com/excel/DateTimeWS.htm

C. Pearson is a popular name around here, right? Is he an MVP?
He uses non-ATP formulae. Not sure if they are identical to the ones >
suggested here. Too lazy to check.


Great site, great guy. He is indeed an MVP.

Is Biff a real name or is it an acronym like Epinn? >
Does Biff stand for "big in functions/ formulae" by chance? ;)


Could be an NG handle, I must admit I have always assumed that it is. But if
you recall, in Back to The Future, Marty's adversary is called Biff Tannen,
so it could be real.
 
D

Don Guillett

Since your system date is wrong, I am taking the liberty of deleting your
message.
Some do this on purpose to make sure that their message is at the top. Did
you?

--
Don Guillett
SalesAid Software
(e-mail address removed)
Hi all,

Bob is more than a demonstrative teacher; he is understanding too. Yes, it
was a case of information overload. I thought I had never seen an equal
sign without "if" when I actually saw it quite a few times with SUMPRODUCT.
After staying away from this thread for a couple of days and coming back
fresh, I have a better grasp of the formulae.

=WORKDAY(DATE(YEAR(A1),MONTH(A1)+1,1),-1)

The above formula is so straight-forward that I can understand easily.



=EOMONTH(TODAY(),0)-(WEEKDAY(EOMONTH(TODAY(),0))={1,7})*({2,1})

I finally understand this with Bob's English interpretation plus realizing
the dash is a minus sign and the star is coercing and not a multiplication
sign. Same idea as SUMPRODUCT, no big deal. I didn't know I could use this
kind of format (array, coercing etc.) widely.



What a relief!



I don't understand Biff's shortest formula though.



=WORKDAY(EOMONTH(A1,0)-7,5)


"5" means there are five work days, right? Can't figure out minus 7? 7 is
Saturday or 7 means 7 days in a week. I don't want to torture my brain too
much now ......

I won't worry about the non-ATP formulae as I want to prevent a
short-circuit.

I lost faith in that web site as they had the wrong formula. Now, I am
switching to another web site with lots of goodies.

http://www.cpearson.com/excel/DateTimeWS.htm

C. Pearson is a popular name around here, right? Is he an MVP? He uses
non-ATP formulae. Not sure if they are identical to the ones suggested
here. Too lazy to check.

Is Biff a real name or is it an acronym like Epinn? Does Biff stand for
"big in functions/ formulae" by chance? ;)

Thank you for the input.

Epinn

I gave an alternate solution non-ATP earlier

=DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)
-5))

and non-array

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
E

Epinn

No, please don't delete my message. I want it.

As you know, I was learning about WORKDAY( ). So, I changed my clock/calendar to 2008 to test the formula for leap year. Then I forgot to change it back. After a few days, I realized and then I changed it back to 2006.

If you have read my other post, you will be aware that I do my best in terms of etiquette. So, always ask first before anyone jumps to conclusion.

For the record, I DID NOT try to have my post on top by changing the date!!

I really like to have all my messages because I haven't recorded all into my database yet. Glad I caught your message. Please recover if you have deleted.

Epinn

Since your system date is wrong, I am taking the liberty of deleting your
message.
Some do this on purpose to make sure that their message is at the top. Did
you?

--
Don Guillett
SalesAid Software
(e-mail address removed)
Hi all,

Bob is more than a demonstrative teacher; he is understanding too. Yes, it
was a case of information overload. I thought I had never seen an equal
sign without "if" when I actually saw it quite a few times with SUMPRODUCT.
After staying away from this thread for a couple of days and coming back
fresh, I have a better grasp of the formulae.

=WORKDAY(DATE(YEAR(A1),MONTH(A1)+1,1),-1)

The above formula is so straight-forward that I can understand easily.



=EOMONTH(TODAY(),0)-(WEEKDAY(EOMONTH(TODAY(),0))={1,7})*({2,1})

I finally understand this with Bob's English interpretation plus realizing
the dash is a minus sign and the star is coercing and not a multiplication
sign. Same idea as SUMPRODUCT, no big deal. I didn't know I could use this
kind of format (array, coercing etc.) widely.



What a relief!



I don't understand Biff's shortest formula though.



=WORKDAY(EOMONTH(A1,0)-7,5)


"5" means there are five work days, right? Can't figure out minus 7? 7 is
Saturday or 7 means 7 days in a week. I don't want to torture my brain too
much now ......

I won't worry about the non-ATP formulae as I want to prevent a
short-circuit.

I lost faith in that web site as they had the wrong formula. Now, I am
switching to another web site with lots of goodies.

http://www.cpearson.com/excel/DateTimeWS.htm

C. Pearson is a popular name around here, right? Is he an MVP? He uses
non-ATP formulae. Not sure if they are identical to the ones suggested
here. Too lazy to check.

Is Biff a real name or is it an acronym like Epinn? Does Biff stand for
"big in functions/ formulae" by chance? ;)

Thank you for the input.

Epinn

I gave an alternate solution non-ATP earlier

=DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)
-5))

and non-array

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
D

Don Guillett

You are forgiven. I only deleted from my computer.

--
Don Guillett
SalesAid Software
(e-mail address removed)
No, please don't delete my message. I want it.

As you know, I was learning about WORKDAY( ). So, I changed my
clock/calendar to 2008 to test the formula for leap year. Then I forgot to
change it back. After a few days, I realized and then I changed it back to
2006.

If you have read my other post, you will be aware that I do my best in terms
of etiquette. So, always ask first before anyone jumps to conclusion.

For the record, I DID NOT try to have my post on top by changing the date!!

I really like to have all my messages because I haven't recorded all into my
database yet. Glad I caught your message. Please recover if you have
deleted.

Epinn

Since your system date is wrong, I am taking the liberty of deleting your
message.
Some do this on purpose to make sure that their message is at the top. Did
you?

--
Don Guillett
SalesAid Software
(e-mail address removed)
Hi all,

Bob is more than a demonstrative teacher; he is understanding too. Yes, it
was a case of information overload. I thought I had never seen an equal
sign without "if" when I actually saw it quite a few times with SUMPRODUCT.
After staying away from this thread for a couple of days and coming back
fresh, I have a better grasp of the formulae.

=WORKDAY(DATE(YEAR(A1),MONTH(A1)+1,1),-1)

The above formula is so straight-forward that I can understand easily.



=EOMONTH(TODAY(),0)-(WEEKDAY(EOMONTH(TODAY(),0))={1,7})*({2,1})

I finally understand this with Bob's English interpretation plus realizing
the dash is a minus sign and the star is coercing and not a multiplication
sign. Same idea as SUMPRODUCT, no big deal. I didn't know I could use this
kind of format (array, coercing etc.) widely.



What a relief!



I don't understand Biff's shortest formula though.



=WORKDAY(EOMONTH(A1,0)-7,5)


"5" means there are five work days, right? Can't figure out minus 7? 7 is
Saturday or 7 means 7 days in a week. I don't want to torture my brain too
much now ......

I won't worry about the non-ATP formulae as I want to prevent a
short-circuit.

I lost faith in that web site as they had the wrong formula. Now, I am
switching to another web site with lots of goodies.

http://www.cpearson.com/excel/DateTimeWS.htm

C. Pearson is a popular name around here, right? Is he an MVP? He uses
non-ATP formulae. Not sure if they are identical to the ones suggested
here. Too lazy to check.

Is Biff a real name or is it an acronym like Epinn? Does Biff stand for
"big in functions/ formulae" by chance? ;)

Thank you for the input.

Epinn

I gave an alternate solution non-ATP earlier

=DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)
-5))

and non-array

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
R

RagDyeR

If you could do more then that, let me know how!<bg>
--

Regards,

RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------

You are forgiven. I only deleted from my computer.

--
Don Guillett
SalesAid Software
(e-mail address removed)
No, please don't delete my message. I want it.

As you know, I was learning about WORKDAY( ). So, I changed my
clock/calendar to 2008 to test the formula for leap year. Then I forgot to
change it back. After a few days, I realized and then I changed it back to
2006.

If you have read my other post, you will be aware that I do my best in terms
of etiquette. So, always ask first before anyone jumps to conclusion.

For the record, I DID NOT try to have my post on top by changing the date!!

I really like to have all my messages because I haven't recorded all into my
database yet. Glad I caught your message. Please recover if you have
deleted.

Epinn

Since your system date is wrong, I am taking the liberty of deleting your
message.
Some do this on purpose to make sure that their message is at the top. Did
you?

--
Don Guillett
SalesAid Software
(e-mail address removed)
Hi all,

Bob is more than a demonstrative teacher; he is understanding too. Yes, it
was a case of information overload. I thought I had never seen an equal
sign without "if" when I actually saw it quite a few times with SUMPRODUCT.
After staying away from this thread for a couple of days and coming back
fresh, I have a better grasp of the formulae.

=WORKDAY(DATE(YEAR(A1),MONTH(A1)+1,1),-1)

The above formula is so straight-forward that I can understand easily.



=EOMONTH(TODAY(),0)-(WEEKDAY(EOMONTH(TODAY(),0))={1,7})*({2,1})

I finally understand this with Bob's English interpretation plus realizing
the dash is a minus sign and the star is coercing and not a multiplication
sign. Same idea as SUMPRODUCT, no big deal. I didn't know I could use this
kind of format (array, coercing etc.) widely.



What a relief!



I don't understand Biff's shortest formula though.



=WORKDAY(EOMONTH(A1,0)-7,5)


"5" means there are five work days, right? Can't figure out minus 7? 7 is
Saturday or 7 means 7 days in a week. I don't want to torture my brain too
much now ......

I won't worry about the non-ATP formulae as I want to prevent a
short-circuit.

I lost faith in that web site as they had the wrong formula. Now, I am
switching to another web site with lots of goodies.

http://www.cpearson.com/excel/DateTimeWS.htm

C. Pearson is a popular name around here, right? Is he an MVP? He uses
non-ATP formulae. Not sure if they are identical to the ones suggested
here. Too lazy to check.

Is Biff a real name or is it an acronym like Epinn? Does Biff stand for
"big in functions/ formulae" by chance? ;)

Thank you for the input.

Epinn

I gave an alternate solution non-ATP earlier

=DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)
-5))

and non-array

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
E

Epinn

I thought he was trying to archive microsoft.public.excel.newusers and had to delete posts with a bad date. I don't really need to know what other posters do with the stuff on their computer.

If anyone wanted to know why I had 2008, all one had to do was ask.

Glad I didn't have a "heart attack." ;)

Epinn

If you could do more then that, let me know how!<bg>
--

Regards,

RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------

You are forgiven. I only deleted from my computer.

--
Don Guillett
SalesAid Software
(e-mail address removed)
No, please don't delete my message. I want it.

As you know, I was learning about WORKDAY( ). So, I changed my
clock/calendar to 2008 to test the formula for leap year. Then I forgot to
change it back. After a few days, I realized and then I changed it back to
2006.

If you have read my other post, you will be aware that I do my best in terms
of etiquette. So, always ask first before anyone jumps to conclusion.

For the record, I DID NOT try to have my post on top by changing the date!!

I really like to have all my messages because I haven't recorded all into my
database yet. Glad I caught your message. Please recover if you have
deleted.

Epinn

Since your system date is wrong, I am taking the liberty of deleting your
message.
Some do this on purpose to make sure that their message is at the top. Did
you?

--
Don Guillett
SalesAid Software
(e-mail address removed)
Hi all,

Bob is more than a demonstrative teacher; he is understanding too. Yes, it
was a case of information overload. I thought I had never seen an equal
sign without "if" when I actually saw it quite a few times with SUMPRODUCT.
After staying away from this thread for a couple of days and coming back
fresh, I have a better grasp of the formulae.

=WORKDAY(DATE(YEAR(A1),MONTH(A1)+1,1),-1)

The above formula is so straight-forward that I can understand easily.



=EOMONTH(TODAY(),0)-(WEEKDAY(EOMONTH(TODAY(),0))={1,7})*({2,1})

I finally understand this with Bob's English interpretation plus realizing
the dash is a minus sign and the star is coercing and not a multiplication
sign. Same idea as SUMPRODUCT, no big deal. I didn't know I could use this
kind of format (array, coercing etc.) widely.



What a relief!



I don't understand Biff's shortest formula though.



=WORKDAY(EOMONTH(A1,0)-7,5)


"5" means there are five work days, right? Can't figure out minus 7? 7 is
Saturday or 7 means 7 days in a week. I don't want to torture my brain too
much now ......

I won't worry about the non-ATP formulae as I want to prevent a
short-circuit.

I lost faith in that web site as they had the wrong formula. Now, I am
switching to another web site with lots of goodies.

http://www.cpearson.com/excel/DateTimeWS.htm

C. Pearson is a popular name around here, right? Is he an MVP? He uses
non-ATP formulae. Not sure if they are identical to the ones suggested
here. Too lazy to check.

Is Biff a real name or is it an acronym like Epinn? Does Biff stand for
"big in functions/ formulae" by chance? ;)

Thank you for the input.

Epinn

I gave an alternate solution non-ATP earlier

=DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)
-5))

and non-array

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
D

Don Guillett

Had you going there, didn't I? <G>

--
Don Guillett
SalesAid Software
(e-mail address removed)
I thought he was trying to archive microsoft.public.excel.newusers and had
to delete posts with a bad date. I don't really need to know what other
posters do with the stuff on their computer.

If anyone wanted to know why I had 2008, all one had to do was ask.

Glad I didn't have a "heart attack." ;)

Epinn

If you could do more then that, let me know how!<bg>
--

Regards,

RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------

You are forgiven. I only deleted from my computer.

--
Don Guillett
SalesAid Software
(e-mail address removed)
No, please don't delete my message. I want it.

As you know, I was learning about WORKDAY( ). So, I changed my
clock/calendar to 2008 to test the formula for leap year. Then I forgot to
change it back. After a few days, I realized and then I changed it back to
2006.

If you have read my other post, you will be aware that I do my best in terms
of etiquette. So, always ask first before anyone jumps to conclusion.

For the record, I DID NOT try to have my post on top by changing the date!!

I really like to have all my messages because I haven't recorded all into my
database yet. Glad I caught your message. Please recover if you have
deleted.

Epinn

Since your system date is wrong, I am taking the liberty of deleting your
message.
Some do this on purpose to make sure that their message is at the top. Did
you?

--
Don Guillett
SalesAid Software
(e-mail address removed)
Hi all,

Bob is more than a demonstrative teacher; he is understanding too. Yes, it
was a case of information overload. I thought I had never seen an equal
sign without "if" when I actually saw it quite a few times with SUMPRODUCT.
After staying away from this thread for a couple of days and coming back
fresh, I have a better grasp of the formulae.

=WORKDAY(DATE(YEAR(A1),MONTH(A1)+1,1),-1)

The above formula is so straight-forward that I can understand easily.



=EOMONTH(TODAY(),0)-(WEEKDAY(EOMONTH(TODAY(),0))={1,7})*({2,1})

I finally understand this with Bob's English interpretation plus realizing
the dash is a minus sign and the star is coercing and not a multiplication
sign. Same idea as SUMPRODUCT, no big deal. I didn't know I could use this
kind of format (array, coercing etc.) widely.



What a relief!



I don't understand Biff's shortest formula though.



=WORKDAY(EOMONTH(A1,0)-7,5)


"5" means there are five work days, right? Can't figure out minus 7? 7 is
Saturday or 7 means 7 days in a week. I don't want to torture my brain too
much now ......

I won't worry about the non-ATP formulae as I want to prevent a
short-circuit.

I lost faith in that web site as they had the wrong formula. Now, I am
switching to another web site with lots of goodies.

http://www.cpearson.com/excel/DateTimeWS.htm

C. Pearson is a popular name around here, right? Is he an MVP? He uses
non-ATP formulae. Not sure if they are identical to the ones suggested
here. Too lazy to check.

Is Biff a real name or is it an acronym like Epinn? Does Biff stand for
"big in functions/ formulae" by chance? ;)

Thank you for the input.

Epinn

I gave an alternate solution non-ATP earlier

=DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)
-5))

and non-array

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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