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.



1244 posts

Uber Geek


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


1244 posts

Uber Geek


  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.

4195 posts

Uber Geek

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 new jobs are posted to our jobs board:



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




News »

Trending now »
Hot discussions in our forums right now:

A reason not to shop at dick smith
Created by dsnz1, last reply by AKLWestie on 17-May-2013 22:45 (82 replies)
Pages... 4 5 6


Chorus is cutting the cost of VDSL to service providers from June 7
Created by maxzzz, last reply by Ragnor on 16-May-2013 02:57 (40 replies)
Pages... 2 3


A new project coming to Geekzone
Created by freitasm, last reply by CapBBeard on 18-May-2013 20:20 (194 replies)
Pages... 11 12 13


HTC One (2013) owners' discussion
Created by Dingbatt, last reply by bradstewart on 19-May-2013 02:22 (1409 replies)
Pages... 92 93 94


Galaxy S4 to run stock Android, by Google
Created by kiwitrc, last reply by Lambchop on 17-May-2013 02:54 (30 replies)
Pages... 2


Sitting on a boring conference call
Created by SaltyNZ, last reply by SepticSceptic on 17-May-2013 16:52 (14 replies)

Office 365 service outage 2013-05-18
Created by freitasm, last reply by networkn on 18-May-2013 22:31 (12 replies)

Samsung Galaxy SIII Discussion and Owners Thread
Created by networkn, last reply by Johnk on 18-May-2013 14:50 (5522 replies)
Pages... 367 368 369



Geekzone Jobs »
Most recent NZ jobs in technology:

IT Technician
Posted 18-May-2013 22:27

IT Technician
Posted 18-May-2013 22:27

Office Girl
Posted 18-May-2013 13:27

CRM Lead/ Senior MS CRM Consultant
Posted 18-May-2013 09:27

Business Analyst - Technical Web Focus
Posted 18-May-2013 09:27

Senior Front End Developer
Posted 18-May-2013 09:27

Client Support Analyst
Posted 17-May-2013 23:26


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.