Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.



2215 posts

Uber Geek
+1 received by user: 222

Subscriber

Topic # 100167 4-Apr-2012 14:57 Send private message

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...

Create new topic


2215 posts

Uber Geek
+1 received by user: 222

Subscriber

  Reply # 605113 4-Apr-2012 15:10 Send private message

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.

4787 posts

Uber Geek
+1 received by user: 123

Trusted

  Reply # 605138 4-Apr-2012 15:46 Send private message

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.

Create new topic




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:





Trending now »

Hot discussions in our forums right now:

American legal jurisdiction in New Zealand
Created by ajobbins, last reply by ajobbins on 20-Oct-2014 22:53 (22 replies)
Pages... 2


Another Trade Me competitor: SellShed
Created by freitasm, last reply by mattwnz on 20-Oct-2014 15:16 (22 replies)
Pages... 2


Why would Suresignal calls be worse quality than non-Suresignal calls from the same location?
Created by Geektastic, last reply by froob on 21-Oct-2014 08:21 (41 replies)
Pages... 2 3


Picture resizing on the forum
Created by Jase2985, last reply by freitasm on 18-Oct-2014 13:32 (13 replies)

Internet question...
Created by Geektastic, last reply by Geektastic on 17-Oct-2014 22:59 (40 replies)
Pages... 2 3


Why do people keep thinking National are doing a great job?
Created by sxz, last reply by Geektastic on 20-Oct-2014 23:05 (156 replies)
Pages... 9 10 11


Just bought a TiVo online. No wireless adaptor. Will a standard one work? Or do I need the TiVo one ?
Created by Limerick, last reply by graemeh on 20-Oct-2014 16:03 (11 replies)

Lollipop it is then. Android 5 announced with Nexus 6 and 9
Created by Dingbatt, last reply by kiwifidget on 21-Oct-2014 09:16 (57 replies)
Pages... 2 3 4



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.