+ Reply to Thread
Results 1 to 4 of 4

Sumif & Offset together

  1. #1
    Registered User
    Join Date
    01-15-2010
    Location
    Scottsdale
    MS-Off Ver
    Excel 2010
    Posts
    72

    Sumif & Offset together

    I would like to set up a sumif formula that has the [sum range] portion of the formula set up as somekind of offset. My goal is to be able to change one reference cell and have the sumif formula adjust to sum range to a different column.

    see attachment
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sumif & Offset together

    A quick approach:

    E4: =SUMIF($C$10:$C$46,$D4,INDEX($F$10:$G$46,0,$B$2))
    copied down

    In D2 enter 1 or 2 depending on which of the two columns F [1] or G [2] you wish to sum.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sumif & Offset together

    Hi,

    One way.
    With F1 containing a column offset number. e.g. a 1 would indicate column F, a 2 column G ..etc, put the following in E4 and copy to E6
    Please Login or Register  to view this content.
    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Sumif & Offset together

    With this formula, if you type 1 in B2 it'll sum first colun, 2 second and so on

    =SUMIF($C$10:$C$46,$D4,OFFSET($E$10,,$B$2,COUNT($F$10:$F$46)))

    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

+ 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