# Thread: Formula to Search and Average (Excel-Any)

1. ## Formula to Search and Average (Excel-Any)

I need your help to think this formula through. I have names in column A and values in column B. I want to search column A for the names Sarah and Woody, and get the average of their associated values. Is there a quick way to do this? It's Friday and my brain is fried....thanks!

2. ## Re: Formula to Search and Average (Excel-Any)

=SUMIF(A:A,"Sarah",B:[img]/forums/images/smilies/cool.gif[/img]/countif(A:A,"Sarah")
=SUMIF(A:A,"Woody",B:[img]/forums/images/smilies/cool.gif[/img]/countif(A:A,"Woody")

Steve

3. ## Re: Formula to Search and Average (Excel-Any)

Thanks, Steve! That jump-started my thought process. Now, what if I wanted to add all of the values I find and average both Sarah's and Woody's together?

I have this formula, but it's taking the average of the averages.
=((SUMIF(A:A,"Sarah",B:[img]/forums/images/smilies/cool.gif[/img]/COUNTIF(A:A,"Sarah"))+(SUMIF(A:A,"Woody",B:[img]/forums/images/smilies/cool.gif[/img]/COUNTIF(A:A,"Woody")))/2

4. ## Re: Formula to Search and Average (Excel-Any)

=(SUMIF(A:A,"Sarah",B:[img]/forums/images/smilies/cool.gif[/img]+SUMIF(A:A,"Woody",B:[img]/forums/images/smilies/cool.gif[/img])/(COUNTIF(A:A,"Sarah")+COUNTIF(A:A,"Woody"))

5. ## Re: Formula to Search and Average (Excel-Any)

Thanks, Chaunce. I can rest easy this weekend!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•