Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2007

Tip: Looking for answers? Try searching our database.

Help with Array Formula

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Moily - 14 Dec 2007 11:11 GMT
Hi there,

I have a spreadsheet with 7 columns (named Bird, Cow, Horse, Rabbit, Pig,
Cat, Dog) and 23 rows that have either yes or no in each cell - mainly no's.  
If there is a 'yes' in Bird then there should be 'no' in each of the other 6
columns (Cow, Horse, Rabbit, Pig, Cat, Dog).  Basically, if there is a 'yes'
in Bird then they have identified themselves as 'Bird' rather than any other
animal.

I then have 10 more columns (named ans1, ans2, ans3, etc) that each have
responses such as "A", "B", "C", "D", "E" in each column.

Essentially, I want to know how many Birds have chosen "A" as an answer in
'ans1'.  I currently have a formula that can calculate how many 'yeses' in
the 'Bird' column have "A" in the 'ans1' column that goes as follows:
=SUMPRODUCT(($A$2:$A$23="Yes")*($H$2:$H$23="A"))  

I currently use several variations of this formula to create a matrix that
shows how many "A", "B", "C", "D", "E" answers for each of the 7 animal
columns (basically determine how many birds chose each answer, how many cows
chose each answer, etc, etc).

Unfortunately, some animals seem to have a bit of a misunderstanding about
their parentage and think that they are both Birds AND Horses or Cows,
Rabbits AND Dogs or else consider themselves to be Whales and don't fit into
any category offered.  Unfortunately this causes a bit of trouble with my
forumla as it now counts the mixed parentage animals as two or three separate
responses depending on how many columns have 'yeses' for the individual row.

I'd like to have a formula that recognizes only the first 'yes'.  I.e. if an
animal has answered 'yes' to being a Cow, Rabbit AND Dog then the formula
will only count the 'ans1' response for the Cow 'yes' but not the Rabbit
'yes' or the Dog 'yes'.  In this scenario my current formula counts that one
response as three separate ones: one for Cow, one for Rabbit and one for Dog.

Appreciate any help that is offered and hope I've been clear!!!

Best,
Ann
Bob Phillips - 14 Dec 2007 12:04 GMT
How about a different tack.

Instead of trying to outsort it in the counting, use conditional formatting
to spot those that are mixed/no parentage.

For instance, select A2:G23 and add a CF formula of

=COUNTIF($A2:$G2,"Yes")>1

and

=COUNTIF($A2:$G2,"Yes")=0

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hi there,
>
[quoted text clipped - 46 lines]
> Best,
> Ann
Moily - 14 Dec 2007 15:52 GMT
Thank you for your suggestion! It's a good idea but - if I understand your
suggestion correctly - it would only work if I'm working with a limited
amount of data as I would have to do a visual inspection.

Unfortunately, i'm working with about 450 respondants who were each asked 20
questions.  This number may even increase next time so it'd be good to have
an intuitive formula.

> How about a different tack.
>
[quoted text clipped - 59 lines]
> > Best,
> > Ann
Bob Phillips - 15 Dec 2007 13:13 GMT
Intuitive?

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Thank you for your suggestion! It's a good idea but - if I understand your
> suggestion correctly - it would only work if I'm working with a limited
[quoted text clipped - 83 lines]
>> > Best,
>> > Ann
Moily - 17 Dec 2007 12:28 GMT
I mean a set of formulas that can determine the results for me.

> Intuitive?
>
[quoted text clipped - 85 lines]
> >> > Best,
> >> > Ann

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.