+ Reply to Thread
Results 1 to 7 of 7

Add a condition to sumif formula

  1. #1
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Add a condition to sumif formula

    Hi all,

    I have a formula I am trying to resolve:

    =SUMIF(HG3:HG32, "<>#N/A")

    I want to add a bit to formula to take into account and sumif a cell in range hk:3:hk32 has a 'Yes' How do i this?

    I guess I am needing a SUMIFS or something like =SUMIFS(HG3:HG32, "<>#N/A", HK3:HK32, "Yes")


    thank you
    Last edited by rayted; 01-11-2021 at 08:57 AM.
    Thanks,

    R.



  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,598

    Re: Add a condition to sumif formula

    Maybe like this:

    =SUMIFS(HG3:HG32,HG3:HG32, "<>#N/A",HK3:HK32,"yes")

    Hope this helps.

    Pete

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.83 for Mac MS 365
    Posts
    8,480

    Re: Add a condition to sumif formula

    Change it to sumifs. =SUMIFS(range to sum, criteria range, criteria1, criteria range 2, criteria2, etc.)
    Though your sumif looks like it is missing something. usually sumif is =SUMIF(criteria range, criteria, sum range).
    I guess you just want to sum everything while ignoring the #N/A
    Last edited by Sam Capricci; 01-11-2021 at 09:01 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,598

    Re: Add a condition to sumif formula

    Sam,

    if the sum_range is missing the criteria_range is taken as the sum_range with SUMIF.

    Pete

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.83 for Mac MS 365
    Posts
    8,480

    Re: Add a condition to sumif formula

    Pete, yeah, with a little more caffeine I caught that and edited my post.

  6. #6
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Add a condition to sumif formula

    Amazing thank you both!

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,598

    Re: Add a condition to sumif formula

    You're welcome - thanks for the rep.

    Pete

+ 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. How to Use SUMIF to only sum with a condition
    By CasinoDavid in forum Excel General
    Replies: 1
    Last Post: 02-08-2020, 09:45 PM
  2. SUMIF formula with MONTH condition, please help me simplfy
    By roger55 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-16-2016, 12:11 PM
  3. [SOLVED] Sumif Formula With 2 Condition in Horizontal & Vertical
    By Pawan Thakur in forum Excel General
    Replies: 4
    Last Post: 04-27-2015, 09:11 AM
  4. [SOLVED] Add Condition For if and sumif Function Formula
    By Squint in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2015, 12:48 PM
  5. If and sumif condition formula
    By santanuKD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2011, 03:27 AM
  6. Multiple Condition SumIf Formula
    By JP7 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2007, 09:57 PM
  7. Multiple Condition Sumif Formula
    By momtoaj in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2005, 12:06 PM

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