View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Countif function with multiple column criteria?

One way:

=SUMPRODUCT((A1:A500=5)*(LEFT(B1:B500)="y")*(ISNUM BER(SEARCH("tall",C1:C500))))

--
HTH,

RD

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

"Ryan" wrote in message
...
Thanks for the help!

Now if i add a third column to spreadsheet....like this:

5 years tall
5 year short
3 months tall/sick
5 years short/sick
5 years sick/tall

and I enter the function:

=sumproduct(--(a1:a500=5),--(b1:b500="y*"),--(c1:c500="*tall*"))

I get a #NUM error...

I need to search with "y*" because sometimes year maybe spelled
incorectly,
also I need to search the third column for "*tall*" as it may be with
additional text seperated by a forward slash (/).

Any additional suggestions?

"N harkawat" wrote:

=SUMPRODUCT(--(A2:A500=5),--(B2:B500="years"))

"Ryan" wrote:

Hello...

I'm hoping someone, much smarter than I, can help me find a solution to
my
problem.

Problem:
My spreasheet looks like this (two columns):
1 day
2 months
5 years
6 weeks
5 years
7 days
1 month
3 years
1 day
6 weeks

I want to use a count function to count the number of times 5 years
occurs,
and I am having a hard time getting a nestedif function to make this
happen.

Any suggesstions?