+ Reply to Thread
Results 1 to 8 of 8

SUMIF when range and sum_range are in alternating columns

  1. #1
    Registered User
    Join Date
    01-28-2015
    Location
    UK
    MS-Off Ver
    2007
    Posts
    5

    SUMIF when range and sum_range are in alternating columns

    Hi Please help
    I got 4 rows, 8 columns table, so my range in 8 alternating columns, and my sum_range is in another 8 alternating columns.
    SUMIF
    ( range, B3;B7, D3;D7, F3;F7
    criteria, S4
    [sum_range] ) C3;C7, E3;E7, G3;G7


    is it any way to write this =SUMIF(B3:B7,S4,C3:C7)+SUMIF(D3:D7,S4,E3:E7)+SUMIF(F3:F7,S4,G3:G7) in different way?

    thank you
    Last edited by jojo1; 01-28-2015 at 02:04 PM.

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: SUMIF when range and sum_range are in alternating columns

    =sum((((mod(column(b3:g7),2)=0)*(b3:g7=s4))*(mod(column(b3:g7),2)=1)*b3:g7))

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMIF when range and sum_range are in alternating columns

    Quote Originally Posted by tim201110 View Post
    =sum((((mod(column(b3:g7),2)=0)*(b3:g7=s4))*(mod(column(b3:g7),2)=1)*b3:g7))
    Hi.

    Did you test your solution before posting?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Registered User
    Join Date
    01-28-2015
    Location
    UK
    MS-Off Ver
    2007
    Posts
    5

    Re: SUMIF when range and sum_range are in alternating columns

    thank you.
    Probably I should say that my range columns and criteria are text(name of customer) and only sum-range columns are numbers that I need
    to sum (number of hours)
    and maybe that's why it didn't work ???

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMIF when range and sum_range are in alternating columns

    Quote Originally Posted by jojo1 View Post
    is it any way to write this =SUMIF(B3:B7,S4,C3:C7)+SUMIF(D3:D7,S4,E3:E7)+SUMIF(F3:F7,S4,G3:G7) in different way?
    Hi.

    You may be able to get away with simply:

    =SUMIF(B3:F7,S4,C3:G7)

    though this is contingent on their being no pairs of entries in which your criterion (C4) also happens to occur in one of the desired sum_range columns and the value in the next column in the corresponding row is a numerical.

    Regards

  6. #6
    Registered User
    Join Date
    01-28-2015
    Location
    UK
    MS-Off Ver
    2007
    Posts
    5

    Re: SUMIF when range and sum_range are in alternating columns

    Quote Originally Posted by XOR LX View Post
    Hi.

    You may be able to get away with simply:

    =SUMIF(B3:F7,S4,C3:G7)

    though this is contingent on their being no pairs of entries in which your criterion (C4) also happens to occur in one of the desired sum_range columns and the value in the next column in the corresponding row is a numerical.

    Regards
    oh wow so simple
    thank you so much, it's working.

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMIF when range and sum_range are in alternating columns

    You're welcome!

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMIF when range and sum_range are in alternating columns

    NM, already solved in the same way..

+ 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. SUMIF, reciprocal of sum_range
    By leafs4life22 in forum Excel General
    Replies: 5
    Last Post: 12-15-2014, 09:59 PM
  2. Replies: 2
    Last Post: 05-01-2013, 11:53 AM
  3. Using results of formula as Sum_Range in a SUMIF
    By sforney123 in forum Excel General
    Replies: 2
    Last Post: 07-14-2011, 11:35 AM
  4. SUMIF [sum_range] question
    By excellrookie in forum Excel General
    Replies: 3
    Last Post: 03-28-2011, 03:13 PM
  5. [SOLVED] SUMIF - Range name to used for the "sum_range" portion of a SUMIF function
    By Oscar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-11-2005, 07:06 PM

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