Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.

## trig42

Banana?
3964 posts

Uber Geek
+1 received by user: 824

Subscriber

Topic # 100167 4-Apr-2012 14:57

Hi.

I am trying to work out a sum of a range of cells, but only if another cell in the row that contains the number meets a certain criteria.
eg. (forgive formatting)

A     B     C     ...

1  100  x
2  110  y
3  105  z
4  105  x
5  120  y
6  110  x

I want an average of everything with 'x' in column b.

I know how to count the number of x's in column b using COUNTIF, what I want is a SUM of all items in Column A that have an 'x' in column B.

Gurus...

## trig42

Banana?
3964 posts

Uber Geek
+1 received by user: 824

Subscriber

Reply # 605113 4-Apr-2012 15:10

Got it.

sumif(B1:B6,"x",A1:A6) gives me the total from column A of everything with an x in coloumn B, then I just divide it by the COUNTIF(B1:B6,"x")

Works a treat.

## Jaxson

6449 posts

Uber Geek
+1 received by user: 493

Trusted

Reply # 605138 4-Apr-2012 15:46

Hey good stuff man.

I think there's scope for a geekzone wiki on certain topics, whereby if enough people click like etc that bit of info is transferred to the wiki, or something. This is a really good excel post, and it would be cool to collect it with other previous and future excel posts, rather than be buried in the threads etc.

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:

Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:

Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:

News »

Intel unveils the 8th Gen Intel Core Processor family for desktop
Posted 25-Sep-2017 19:45

Chow brothers plan to invest NZ\$100 million in technology
Posted 24-Sep-2017 16:24

Symantec protects data everywhere with Information Centric Security
Posted 21-Sep-2017 15:33

FUJIFILM introduces X-E3 mirrorless camera with wireless connectivity
Posted 18-Sep-2017 13:53

Vodafone announces new plans with bigger data bundles
Posted 15-Sep-2017 10:51

Skinny launches phone with support for te reo Maori
Posted 14-Sep-2017 08:39

If Vodafone dropping mail worries you, you’re doing online wrong
Posted 11-Sep-2017 13:54

Vodafone New Zealand deploy live 400 gigabit system
Posted 11-Sep-2017 11:07

OPPO camera phones now available at PB Tech
Posted 11-Sep-2017 09:56

Norton Wi-Fi Privacy — Easy, flawed VPN
Posted 11-Sep-2017 09:48

Lenovo reveals new ThinkPad A Series
Posted 8-Sep-2017 14:37

Huawei passes Apple for the first time to capture the second spot globally
Posted 8-Sep-2017 10:45

Vodafone initiative enhances te reo Maori pronunciation on Google Maps
Posted 8-Sep-2017 10:40

Voyager Internet expand local internet phone services company with Conversant acquisition
Posted 6-Sep-2017 18:27

NOW Expands in to Tauranga
Posted 5-Sep-2017 18:16

Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.

©2002-2017 Geekzone®