+ Reply to Thread
Results 1 to 20 of 20

Help with multiple COUNIFS & SUMIFS

  1. #1
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Help with multiple COUNIFS & SUMIFS

    Context:
    I'm putting together a flexible template to combine samples into pools of various sizes and check that the pools fulfil certain criteria.



    Problem:
    I need to
    Find the first instance of a pool number (in col. D)
    Count the number of cells with the same pool number (in col. D) and display on the row of the first instance
    Count the values in C divided by sum values in G for the cells that have the same value in D.
    Max G/Min G for the cells that have the same value in D (in J).
    Create a highlight/marked cell in K (for user data entry) for rows that have the first instance of a pool number in D
    Value in G* value in J for rows that have the first instance of a pool number in D
    Sum of M for rows that have the first instance of a pool number in D
    Average of C for rows that have the first instance of a pool number in D


    I started trying to build something flexible and got stuck so the spreadsheet is a bit of a mess.


    Thank you in advance for any help you might be able to offer.
    Attached Files Attached Files

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with multiple COUNIFS & SUMIFS

    Try in F8 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    Quote Originally Posted by José Augusto View Post
    Try in F8 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks Jose, first part fixed!

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with multiple COUNIFS & SUMIFS

    Hi
    Use in H8 adn copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Use in I8 an array formula (you must enter with CTRL+SHIFT+ENTER) and copy down
    =IF(ISNUMBER(F8),MAX(--($D$8:$D$103=D8)*$G$8:$G$103)/MIN(IF(--($D$8:$D$103=D8)*$G$8:$G$103>0,$G$8:$G$103,1E+99)),"")
    In J8 use and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    see the file
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    Hi Jose,
    The I8 array formula seems to be working perfectly!
    The other two formulas don't seem to be doing quite the right thing when I've pasted the formulas in.
    The first one changes the value in H8 from 9.4 to 7.59 and I'm confident that 9.4 is the figure I'm looking for.
    The formula for J8 changes the value from 124.2 to 2.4 and I'm confident that 124.2 is the figure I'm looking for.

    Thank you very much for your help so far, you've been great.

  6. #6
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with multiple COUNIFS & SUMIFS

    Hi
    D47 is 1, D48 is 2 ...
    Is it correct ? So the count from d8:d103 gives me different.

  7. #7
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    Quote Originally Posted by José Augusto View Post
    Hi
    D47 is 1, D48 is 2 ...
    Is it correct ? So the count from d8:d103 gives me different.
    Hi Jose, You are absolutely right about H, I apologise, I wasn't paying enough attention.
    The formula for J should return 124.2 in J8 though. (45/0.36245)
    Thanks again for your help, Scott.

  8. #8
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with multiple COUNIFS & SUMIFS

    You are welcome. Thanks for your feedback.
    Don't forget to mark this thread as SOLVED

  9. #9
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    Hi Jose,

    'In J8 use and copy down
    =IF(ISNUMBER(F8),$K$8/I8,"")
    '

    That part isn't working quite right, it should return a value of 124.2 in J8 but it is returning a value of 2.445.
    This should lead to the value in cell M15 being equal to the manually entered value in cell K8.

    Thanks,
    Scott.

  10. #10
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    The formula it's replacing is =$K$8/MAX(G8:G16)

  11. #11
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with multiple COUNIFS & SUMIFS

    Try in J8 the array formula and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    Hi Jose,
    I think we're nearly there but I would like the samples in pool 2 to reference K17, not K8 and pool 3 reference K21.
    (J17 should be 221.3, not 497.9)
    Is that possible?

    Thanks again for your help, I know this is a long series of questions.

  13. #13
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with multiple COUNIFS & SUMIFS

    Try in J8 the array formula and copy down
    Formula: Select Code copy to clipboard
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    $K8 instead $k$8

  14. #14
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    Quote Originally Posted by José Augusto View Post
    Try in J8 the array formula and copy down
    Formula: Select Code copy to clipboard
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    $K8 instead $k$8
    Perfect! Thanks!

  15. #15
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    Now I just need: The calculation in M to refer to the correct cell in J according to pool number.The calculation in Q to sum all cells in M with the same pool number (D)
    1. The calculation in R to average all cells in C with the same pool number (D)

    Thanks again, I definitely owe you a coffee!

  16. #16
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with multiple COUNIFS & SUMIFS

    Hi Scott
    What version of Excel you are using?

    I suppose you want this approach

    See the the sheet 'Folha1" on file
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    Hi Jose,
    I am using Excel for Mac version 15.18.

    Folha1 looks very good but I need to be able to enter a maximum desired volume per pool (not N3 for all) and I need volume to add to pool (F) to reference the number defined for the pool.

    Thank you very much for all your help so far, I really appreciate it.

  18. #18
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with multiple COUNIFS & SUMIFS

    Hi Scott

    I include a new column with 'Maximum desired volume' that you must enter desired values. So, 'Max /Max desired' has a new formula.

    How can I calculate the volume to add to pool 1?

    See the file
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    10-27-2016
    Location
    Cambridge, England
    MS-Off Ver
    Microsoft Excel for Mac 15.18
    Posts
    22

    Re: Help with multiple COUNIFS & SUMIFS

    Quote Originally Posted by José Augusto View Post
    Hi Scott

    I include a new column with 'Maximum desired volume' that you must enter desired values. So, 'Max /Max desired' has a new formula.

    How can I calculate the volume to add to pool 1?

    See the file
    Hi Jose,
    You have calculated the volume to add to pool correctly! The lowest value in column C for each pool number D (e.g. C23 for pool 3) should result in that cell of row F (F23) being equal to the manually entered value in column O for that pool (e.g. O10 =10) which it is!
    Thanks for all your help.
    I think you've solved my problem.

  20. #20
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with multiple COUNIFS & SUMIFS

    Hi Scott

    I'm happy to have helped and thank you for your feedback.

    Do not forget to mark this thread as SOLVED.

+ 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] COUNIFS exlcuding some texts where it i in Exclusion list 091115-2
    By thilag in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-16-2015, 05:58 AM
  2. [SOLVED] COUNIFS exlcuding some texts in vertical columns
    By thilag in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-09-2015, 04:20 AM
  3. Replies: 5
    Last Post: 02-06-2015, 08:44 PM
  4. SUMIFS COUNIFS for just Monday-Friday
    By hc91 in forum Excel General
    Replies: 1
    Last Post: 09-04-2014, 10:28 AM
  5. Replies: 2
    Last Post: 01-23-2013, 06:25 AM
  6. SUMIFS Puzzle - Trying to avoid adding multiple SUMIFS to get valid result
    By haldavid in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-09-2013, 03:42 PM
  7. Counifs then multiply to another column
    By equitalig in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-15-2011, 11:07 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