Hi, I have a table similiar to this on Sheet1:
Col A ColB
2 Dog
5 Dog
3 Cat
8 Dog
On Sheet2, I want to calculate the average of the values in ColA where
ColB says Dog.
So sheet 2 would be:
Average
Dog 5
Cat 3
How can i do this?
Thank you!!
Hi, I have a table similiar to this on Sheet1:
Col A ColB
2 Dog
5 Dog
3 Cat
8 Dog
On Sheet2, I want to calculate the average of the values in ColA where
ColB says Dog.
So sheet 2 would be:
Average
Dog 5
Cat 3
How can i do this?
Thank you!!
Try this:
=AVERAGEIF(B1:B4,"=dog",A1:A4)
Brian
"dan" <[email protected]> wrote in message
news:[email protected]...
> Hi, I have a table similiar to this on Sheet1:
>
> Col A ColB
> 2 Dog
> 5 Dog
> 3 Cat
> 8 Dog
>
> On Sheet2, I want to calculate the average of the values in ColA where
> ColB says Dog.
>
> So sheet 2 would be:
> Average
> Dog 5
> Cat 3
>
>
> How can i do this?
>
> Thank you!!
>
I use sumif/countif
=SUMIF(B2:B5,"Dog",A2:A5)/COUNTIF(B2:B5,"Dog")
=SUMIF(B2:B5,"Cat",A2:A5)/COUNTIF(B2:B5,"Cat")
"dan" <[email protected]> wrote in message
news:[email protected]...
> Hi, I have a table similiar to this on Sheet1:
>
> Col A ColB
> 2 Dog
> 5 Dog
> 3 Cat
> 8 Dog
>
> On Sheet2, I want to calculate the average of the values in ColA where
> ColB says Dog.
>
> So sheet 2 would be:
> Average
> Dog 5
> Cat 3
>
>
> How can i do this?
>
> Thank you!!
>
=AVERAGE(IF(Sheet1!a2:A200="Dog",Sheet1!A2:A200))
which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"dan" <[email protected]> wrote in message
news:[email protected]...
> Hi, I have a table similiar to this on Sheet1:
>
> Col A ColB
> 2 Dog
> 5 Dog
> 3 Cat
> 8 Dog
>
> On Sheet2, I want to calculate the average of the values in ColA where
> ColB says Dog.
>
> So sheet 2 would be:
> Average
> Dog 5
> Cat 3
>
>
> How can i do this?
>
> Thank you!!
>
On 7 Jul 2006 11:15:22 -0700, "dan" <[email protected]> wrote:
>Hi, I have a table similiar to this on Sheet1:
>
>Col A ColB
>2 Dog
>5 Dog
>3 Cat
>8 Dog
>
>On Sheet2, I want to calculate the average of the values in ColA where
>ColB says Dog.
>
>So sheet 2 would be:
> Average
>Dog 5
>Cat 3
>
>
>How can i do this?
>
>Thank you!!
Just another thought -- you could use a Pivot Table.
With a cell in your table selected:
Data/Pivot Table
Then drag Col B to the Rows area
Col A to the Data area
Right click on the Data
Field Settings
Select Average of Column A
Format to taste -- there are many options.
--ron
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks