# I was looking to get assistance with a formula in Excel 2002

G

#### Guest

I am creating a if/then formula that will look at a cell in column A that
contains either one of the following day notations MON, TUE, WED, THU, FRI,
SAT, SUN, or HOL. If the date is between any non holiday weekday it should
be included in a count. The second part of the if/then statement includes
the choice between OK and DEFECT. I am trying to count only the defects that
happen during non holiday dates for entire month. I have written the
following formula for a single day but have had no luck. Can anyone point me
in the right direction?

=IF(((\$A7=MON, TUE, WED, THU, FRI)=AND(\$D7=DEFECT)),1,0)

B

I don't know what you are trying to do on a bigger picture.. but the
formula would be:

=IF(AND(OR(A7="MON",A7="TUE",A7="WED",A7="THU",A7="FRI"),D7="DEFECT"),1,0)

There is probably something shorter and easier. but it eludes me right
now

HTH

G

#### Guest

maybe

=IF(AND(OR(\$A7={"mon","Tue","Wed","Thu","Fri"}),\$D7="Defect"),1, 0)

G

#### Guest

Thanks, but it didn't work.

Duke Carey said:
maybe

=IF(AND(OR(\$A7={"mon","Tue","Wed","Thu","Fri"}),\$D7="Defect"),1, 0)

G

#### Guest

The answer that you had sent worked, Thanks. If that was the out come for
one day and I wanted to add a string of days would I place the whole equation
in parentheses and combine them with + signs?

G

#### Guest

Works perfectly. Just copy it from the message and paste it into your

C

#### CarlosAntenna

It works for me.

I've never seen the curly brackets used that way before. Usually they are
inserted automatically when you do an array formula with ctrl-alt-enter.
Can they be used anywhere you want to use a list of possible values?

G

#### Guest

Carlos -

I'm far from an expert on where & when you can use the curly brackets.
Harlan Grove is the one to whom you should pose your question. He seems to
have an encyclopedic knowledge about their use.

Duke