Workdays function not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My formula doesn't produce an error, but it doesn't work either! Can someone
help?

DateFrom is the name I've applied to cell N9.

In cell G23 I want to show DateForm - 7 working days, so I've entered this
formula in the cell:
=IF(DateFrom<>"",WORKDAY(DateFrom,-7),"")

Can someome tell me what's is wrong with this syntax? (Analysis Toolpack is
installed.)

Many thanks!
 
Nothing wrong with the syntax.

It's always easier for people to help you if you tell us the symptoms,
rather than just "It doesn't work". What value does the formula give you?
Are you sure that you haven't got a typo? (For example, in your message you
had DateForm once and DateFrom twice).

What do you get if you put =DateFrom into a spare cell? What do you get if
you put =N9? What do you get if you put =WORKDAY(DateFrom,-7)?

Are you sure you've got the calculation mode set to automatic? What happens
if you do an F9?
 
Thanks for responding, David. No, there isn't a typo in the formula - it is
=IF(DateFrom<>"",WORKDAY(DateFrom,-7),"")

The error I'm getting says "#NAME?".

As mentioned, I do have the Analysis tool pack installed. I've also tryed
ticked Tools/Options/Calculation/"Accept labels in formulas". I've verified
that the label "DateFrom" exists as well.
 
Hi

What do you get, when you enter the formula
=DateFrom
into any free cell. I'm afraid it too will be "#NAME". When yes, then check
your name definition - probably it's corrupted (p.e. you deleted the cell
N9, or row/column with it, accidentally).
 
Thanks for responding, David. No, there isn't a typo in the formula - it is
=IF(DateFrom<>"",WORKDAY(DateFrom,-7),"")

The error I'm getting says "#NAME?".

As mentioned, I do have the Analysis tool pack installed. I've also tryed
ticked Tools/Options/Calculation/"Accept labels in formulas". I've verified
that the label "DateFrom" exists as well.

Try the formula:

=WORKDAY(TODAY(),7)

If that, too, gives a NAME error, then Excel doesn't realize that the ATP is
installed.

Try uninstalling and re-installing.

I've read of this happening in the past, but don't recall the reason why.
--ron
 
OK. You said originally that the formula doesn't produce an error, but now
you've told us what error it does produce. What are the answers to the
other questions I asked?

I see that you're talking about "labels in formulas" (which is a facility I
don't normally use), but I wonder whether there is some confusion between
labels and names. What do you see in the "refers to" field if you use
Insert/ Name/ Define and look for DateFrom? What do you see in the
reference field if you use Edit/ Go To/ and select DateFrom? If you are
using a label rather than a defined name, in which cell is the label?

It may also be useful for you to use the Formula Auditing toolbar, select
the cell (G23) which shows the error, & use the "Trace Error" button.

You can find further help on the #NAME? error at:
http://office.microsoft.com/en-us/excel/HP030560001033.aspx?pid=CH010004941033--David Biddulph"Christine" <[email protected]> wrote in messageThanks for responding, David. No, there isn't a typo in the formula - itis> =IF(DateFrom<>"",WORKDAY(DateFrom,-7),"")>> The error I'm getting says "#NAME?".>> As mentioned, I do have the Analysis tool pack installed. I've also tryed> ticked Tools/Options/Calculation/"Accept labels in formulas". I'veverified> that the label "DateFrom" exists as well.>>> "David Biddulph" wrote:>>> Nothing wrong with the syntax.>>>> It's always easier for people to help you if you tell us the symptoms,>> rather than just "It doesn't work". What value does the formula giveyou?>> Are you sure that you haven't got a typo? (For example, in your messageyou>> had DateForm once and DateFrom twice).>>>> What do you get if you put =DateFrom into a spare cell? What do you getif>> you put =N9? What do you get if you put =WORKDAY(DateFrom,-7)?>>>> Are you sure you've got the calculation mode set to automatic? Whathappens>> if you do an F9?>> -->> David Biddulph>>>> "Christine" <[email protected]> wrote in message>> > My formula doesn't produce an error, but it doesn't work either! Can>> > someone>> > help?>> >>> > DateFrom is the name I've applied to cell N9.>> >>> > In cell G23 I want to show DateForm - 7 working days, so I've enteredthis>> > formula in the cell:>> > =IF(DateFrom<>"",WORKDAY(DateFrom,-7),"")>> >>> > Can someome tell me what's is wrong with this syntax? (AnalysisToolpack>> > is>> > installed.)>> >>> > Many thanks!>>>>>>
 
Hello driller2

=WORKDAY(A1,-1) would give you the previous workday so if A1 is a Saturday
or a Sunday it gives the previous Friday, similarly

=WORKDAY(A1,-7) gives the Thursday of the week before if A1 is a Saturday or
Sunday.
 

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

Similar Threads


Back
Top