+ Reply to Thread
Results 1 to 10 of 10

COUNTIFS adding values from another cell HELP!

  1. #1
    Registered User
    Join Date
    04-22-2024
    Location
    Fort Lauderdale, FL
    MS-Off Ver
    Office 365 (non desk top version)
    Posts
    84

    COUNTIFS adding values from another cell HELP!

    I have a sheet that I need help with a formula.

    I have this formula for one cell:
    =COUNTIFS(K8:K257,">15",K8:K257,"<31")

    I need a formula for cell D10 that will take the values from Q8:Q57 if they align with the results from the corresponding formula above.

    i.e. add all the values of Q8:Q57 that cell K8:K257 are between 15 & 30.

    I know I have used this in the past, however my memory is escaping me and I know it is something simple.

    Lets say Formula 1 is in C10 and the new formula would be in D10 if that matters which I do think it is irrelevant.

    Thank you in advance.
    Attached Files Attached Files
    Last edited by Destyn; 08-14-2024 at 08:38 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,494

    Re: COUNTIFS adding values from another cell HELP!

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    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
    04-22-2024
    Location
    Fort Lauderdale, FL
    MS-Off Ver
    Office 365 (non desk top version)
    Posts
    84

    Re: COUNTIFS adding values from another cell HELP!

    I wish I could attach, however the sheet I have contains a lot of very sensitive info on it pertaining to a very large company.

  4. #4
    Registered User
    Join Date
    04-22-2024
    Location
    Fort Lauderdale, FL
    MS-Off Ver
    Office 365 (non desk top version)
    Posts
    84

    Re: COUNTIFS adding values from another cell HELP!

    In a nut shell this is what I need

    A formula to calculate the sum of values from cells Q8:Q257 if the value of cells K8:K257 is between 16-30

  5. #5
    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,494

    Re: COUNTIFS adding values from another cell HELP!

    We don't want the actual file, or a subset of it, just a sample that represents the structure of the workbook, the layout of the sheet(s), and some "typical" data.

    I cannot help with a solution without having something to work with. I can try to visualise what the data looks like, but what are the chances I get it right? And then the thread drags on, and on. Been there, done that, not doing it again. Up to you.

  6. #6
    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,494

    Re: COUNTIFS adding values from another cell HELP!

    A formula to calculate the sum of values from cells Q8:Q257 if the value of cells K8:K257 is between 16-30

    Sounds like you want SUMIFS rather than COUNTIFS.

  7. #7
    Registered User
    Join Date
    04-22-2024
    Location
    Fort Lauderdale, FL
    MS-Off Ver
    Office 365 (non desk top version)
    Posts
    84

    Re: COUNTIFS adding values from another cell HELP!

    Attached a test file with an example of the data sets

    A formula to calculate the sum of values from Q8:Q257 if the value of cells K8:K257 is between 16-30

  8. #8
    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,494

    Re: COUNTIFS adding values from another cell HELP!

    For the counts:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    For the sum:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    04-22-2024
    Location
    Fort Lauderdale, FL
    MS-Off Ver
    Office 365 (non desk top version)
    Posts
    84

    Re: COUNTIFS adding values from another cell HELP!

    WOW! That thread is way past my limited expertise w/ Excel. Some advanced level $#it there. I should have specified that Column K & Q are actually on another tab, figured I could just replace the K8:K257 from the tab, however I see K & Q all over that formula. I will see if I can figure it out to see if it still works after I mangle it from the other tabs. But I do sincerely thank you. I figured it was more of a =SUMIFS answer, I know ZERO about =LET.
    Last edited by Destyn; 08-16-2024 at 07:31 PM.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,057

    Re: COUNTIFS adding values from another cell HELP!

    LET simply allows parameters to be set up and it's worth learning.

    In your case, all you have to change are the k and q parameters from this:

    =LET(k,$K$8:$K$16,q,$Q$8:$Q$16,SUMIFS(q,k,">="&IFERROR(TEXTBEFORE(B9,"-")+0,91),k,"<="&IFERROR(TEXTAFTER(B9,"-")+0,9.9E+307)))

    to this (choose the correct sheet name, of course):

    =LET(k,Sheet2!$K$8:$K$16,q,Sheet2$Q$8:$Q$16,SUMIFS(q,k,">="&IFERROR(TEXTBEFORE(B9,"-")+0,91),k,"<="&IFERROR(TEXTAFTER(B9,"-")+0,9.9E+307)))

    Nothing else needs changing at all.
    Last edited by AliGW; 08-17-2024 at 01:02 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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] Countifs, reference cell and countifs from multiple tabs
    By rayted in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-22-2022, 04:30 AM
  2. [SOLVED] Assistance with COUNTIFS when adding another cell in
    By AceForSale in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2016, 10:44 AM
  3. [SOLVED] Need countifs formula for multiple values in single cell
    By hmr2662 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-14-2016, 11:02 AM
  4. Adding corresponding values of a date range (SUMIFS & COUNTIFS)
    By Apol21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-29-2016, 12:32 PM
  5. COUNTIFS Not Adding Up
    By cloud36 in forum Excel General
    Replies: 8
    Last Post: 07-13-2012, 10:41 PM
  6. Replies: 4
    Last Post: 06-28-2012, 07:08 AM
  7. Adding cell values that are dependent on adjacent cell values
    By globulous in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-27-2009, 10:37 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