+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Depending on value of one column, counting values in another column

  1. #1
    Registered User
    Join Date
    01-22-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    16

    Lightbulb Depending on value of one column, counting values in another column

    Hello,
    I have a data spreadsheet from an experiment I conducted, and I am looking at 2 columns like the following, with 0 and 1 being "incorrect" and "correct" responses, respectively:

    A____B
    F____0
    B____1
    F____1
    F____1
    B____1
    N____0

    I am trying to figure out a way to have excel search each cell of the first column for one of the letters, then have it go and see whether the second column has a "0" or a "1" in it, then have it spit out something like this:

    F: Correct: 2 Incorrect: 1
    B: Correct: 2 Incorrect: 0
    N: Correct: 0 Incorrect: 1

    I am trying to eliminate having to count these by hand since I have 1100 cells per column.

    Help will be GREATLY appreciated!
    -Marina
    Last edited by chiasmata; 01-22-2011 at 08:51 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,485

    Re: Depending on value of one column, counting values in another column

    Use SUMIF

    =SUMIF(A:A,"F",B:B)

    Or, maybe SUMIFS or COUNTIFS in Excel 2007

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-22-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    16

    Re: Depending on value of one column, counting values in another column

    Hello,

    Thanks very much for your response! I'm very basic at Excel and although I see how to use SUMIF to add the 0s and 1s, I am still not sure how to see a "counter" where it shows how many zeroes and ones appear per letter (F,B, N).

    -Marina

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,485

    Re: Depending on value of one column, counting values in another column

    =COUNTIFS(A2:A7,"B",B2:B7,0)
    =COUNTIFS(A2:A7,"B",B2:B7,1)
    =COUNTIFS(A2:A7,"F",B2:B7,0)
    =COUNTIFS(A2:A7,"F",B2:B7,1)
    =COUNTIFS(A2:A7,"N",B2:B7,0)
    =COUNTIFS(A2:A7,"N",B2:B7,1)


    Regards

  5. #5
    Registered User
    Join Date
    01-22-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    16

    Re: Depending on value of one column, counting values in another column

    Thank you SO MUCH! SO VERY MUCH! You've just saved me hours upon hours of repetitive work!
    Cheers!!
    -Marina

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1