+ Reply to Thread
Results 1 to 5 of 5

How to sumif with multiple range and single sumrange

  1. #1
    Registered User
    Join Date
    11-05-2007
    Posts
    30

    How to sumif with multiple range and single sumrange

    Hi,

    great website... heres my issue...

    A B C D .... AZ
    3 X U Z ...
    7 Z T D ...
    9 Y X C ...
    ...

    in a separate cell, i want to put a formula that will sum col A whenever there is a row in the cols B:AZ that contains "X".

    the example above would give me 9+3 = 12... I would then be able to do a drop down for all of the values... eg Y=9, Z =3+7 = 10, etc

    i tried sumif(B:AZ,"X",A:A)... but it would not add the 9 for the "X" in col C

    if someone can do a simple spreadsheet to show me or any ideas that would be great...

    please let me know if you need more clarification...

    thx

    helpPlease!

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon helpplease!

    ...and welcome to the forum!!

    Try this formula :
    =SUM(IF(B1:H100="X",A1:A100,0))
    This is an array formula, so to commit use Shift + Ctrl + Enter (not just Enter)

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    What happens if "X" occurs more than once in a single row? Do you want to sum column A for each occurrence or only once?

  4. #4
    Registered User
    Join Date
    11-05-2007
    Posts
    30

    it works

    thanks dominic... worked out

    a prerequisite is that X cannot appear more than once in a row... however if that happens then col A would sum twice

  5. #5
    Registered User
    Join Date
    06-11-2007
    Location
    Nonthaburee Province, Thailand
    MS-Off Ver
    MS Office 2003 to MS Office 2010
    Posts
    82
    Suppose CheckRange is B2:AZ100 and Constant Value Store at A2:A100

    Using SUMPRODUCT

    =Sumproduct((B2:AZ100="X")*(A2:A100))
    Press Enter
    N. Yauvasuta
    Power User Excel.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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