+ Reply to Thread
Results 1 to 12 of 12

counting numbers of two rows with two conditions

  1. #1
    Registered User
    Join Date
    06-13-2016
    Location
    Hamburg, Germany
    MS-Off Ver
    2007
    Posts
    11

    Post counting numbers of two rows with two conditions

    Dear smart people,

    I have a problem with Excel. I'm doing a bachelor thesis on Entrepreneurial Attitudes and handed out questionaires. I'm now trying to work with them and I am a bit stuck. Help is highly appreciated. My goal is to compare the answers of students from my home university with those of my abroad university. I have a row with the university (translated into number 1 or 2), and I have a row with the answers ranging form 1 to 7.


    Strongly disagree= 1
    Moderatly disagree= 2
    Slightly disagree = 3
    neither agree or disagree= 4
    Slightly agree= 5
    Moderatly agree= 6
    Strongly agree= 7

    I now want to count for each of the 7 answers, how many answered form my home university and how many answered from my abroad university.

    So if I want to do that for "Neither agree or disagree" for my home university I have two conditions: In the row of the "question" it needs to be a 4 and in the row of the "university" it needs to be a 1. And both need to be in the same column as well if I'm not mistaken.

    With Kind Regards,
    Why are you doing this to me Excel whyyyy?!
    Last edited by WhyExcelWhy?; 06-13-2016 at 03:01 PM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: counting numbers of two rows with two conditions

    Sounds like a job for COUNTIFS.
    Could you post some sample data (in a workbook)? Much easier to provide a solution if we can see your data layout.

    BSB

  3. #3
    Registered User
    Join Date
    06-13-2016
    Location
    Hamburg, Germany
    MS-Off Ver
    2007
    Posts
    11

    Re: counting numbers of two rows with two conditions

    How can I post a worksheet in this forum?

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,255

    Re: counting numbers of two rows with two conditions

    Click "Go Advanced" then scroll down to "Mange Attachments"

  5. #5
    Registered User
    Join Date
    06-13-2016
    Location
    Hamburg, Germany
    MS-Off Ver
    2007
    Posts
    11

    Re: counting numbers of two rows with two conditions

    Is it now attached. Not sure.
    Attached Files Attached Files

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: counting numbers of two rows with two conditions

    See attached for a COUNTIFS solution.

    BSB
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,255

    Re: counting numbers of two rows with two conditions

    Try

    =COUNTIFS($A$2:$A$31,"=" &RIGHT(H$4)*1,$B$2:$B$31,"=" &ROWS($1:1))

    Copy across and down to "Strongly agree"

    For "Empty"

    =COUNTIFS($A$2:$A$31,"="&RIGHT(H$4)*1,$B$2:$B$31,"=0")

    SUM

    =SUM(H5:H12)

  8. #8
    Registered User
    Join Date
    06-13-2016
    Location
    Hamburg, Germany
    MS-Off Ver
    2007
    Posts
    11

    Re: counting numbers of two rows with two conditions

    Thank you so much! You are really helping me out with this!

  9. #9
    Registered User
    Join Date
    06-13-2016
    Location
    Hamburg, Germany
    MS-Off Ver
    2007
    Posts
    11

    Re: counting numbers of two rows with two conditions

    Just one last question, the two data sets are not next to each other in the original dataset? Will I have problems with the Matrix because of that?

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: counting numbers of two rows with two conditions

    Shouldn't be a problem. Just refer to the correct ranges and all should work as expected.

    BSB

  11. #11
    Registered User
    Join Date
    06-13-2016
    Location
    Hamburg, Germany
    MS-Off Ver
    2007
    Posts
    11

    Re: counting numbers of two rows with two conditions

    I tried it and it worked really well. Thank you so much!

  12. #12
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: counting numbers of two rows with two conditions

    Happy to help

    Don't forget to mark the thread as SOLVED if you're happy you have a working solution.

    Have a good evening.

    BSB

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need Help with Counting Function for multiple rows (with conditions)
    By CosmicChameleon in forum Excel General
    Replies: 4
    Last Post: 02-13-2015, 10:02 PM
  2. Counting of Rows in a Range with 2 conditions
    By gregorolaf in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-11-2013, 06:43 PM
  3. [SOLVED] Counting all the past 15 rows of 22 numbers
    By khank in forum Excel General
    Replies: 4
    Last Post: 08-30-2012, 12:04 PM
  4. Counting rows satisfying two conditions
    By gozillasnack in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-28-2007, 03:08 PM
  5. [SOLVED] Counting rows containing data (both numbers and text)
    By mconnolly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  6. [SOLVED] Counting rows containing data (both numbers and text)
    By KL in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 06:05 AM
  7. [SOLVED] Counting rows containing data (both numbers and text)
    By mconnolly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

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