View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Epinn Epinn is offline
external usenet poster
 
Posts: 605
Default WORKDAY() and probably more

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

"Bob Phillips" wrote in message ...
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(EOMO NTH(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 ToolsAdd-Ins..., and check Analysis
Toolpak.

"Epinn" wrote in message
...
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/...soft_excel.htm

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

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

I will stay tuned.

Epinn