+ Reply to Thread
Results 1 to 3 of 3

Complex SUMIF

  1. #1
    Registered User
    Join Date
    03-25-2012
    Location
    London, england
    MS-Off Ver
    Excel 2007
    Posts
    1

    Complex SUMIF

    Hi all,

    I'm looking to solve a complex sumif formula. Basically if one column (C) reads "UK", I would like to sum another column. The additional complexity is in the fact that I only want to test the 4th value in column C, and then if the test is TRUE, sum the 4th value in column O. The current formula is below:

    =SUM(IF(MOD(ROW($C$5:$C$120)-ROW($C$5)+2,4)=0,$C$5:$C$120="UK"),SUM(IF(MOD(ROW($O$6:$O$120)-ROW($O$6),4)=0,$O$6:$O$120,0)))

    Column C looks like this:

    UK
    UK
    UK
    US
    US
    UK

    and Column O contains values.

    At the moment the formula above works, but it doesn't seem to only sum for cells which contain "UK". Can anyone help?

    Many thanks

    Alex

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Complex SUMIF

    With the 4th value testing, what is criteria for TRUE value?
    Quang PT

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Complex SUMIF

    You say "every 4th cell" but which is the start row? Assuming row 5 try this

    =SUMPRODUCT((MOD(ROW(C5:C200)-ROW(C5),4)=0)*(C5:C200="UK"),O5:O200)

    adjust start row as required
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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