+ Reply to Thread
Results 1 to 6 of 6

Sum an offset range where column criteria met.

  1. #1
    Registered User
    Join Date
    02-14-2010
    Location
    Scotland
    MS-Off Ver
    MS Office 2013
    Posts
    35

    Sum an offset range where column criteria met.

    Hi All,

    I'm hoping someone could kindly assist with a small issue I have? Unfortunately I have not been able to collaborate the correct formulas to get the results I need.

    Brief:-
    I have a sheet that contains figures for a number of agencies that run from month 1 to 12. The order that each agency can appear can differ each time the report is ran.

    The user can enter the current month number in to a cell on which another cell calculates the YTD (sum from month 1 to the user entered cell).

    Therefore, the formula would need to be able to identify the client name within a row, offset and sum the required months. Hope this makes sense, I have attached a quick spreadsheet I have knocked together displaying how the information will be displayed.

    Again, any help on this would be very much appreciated.

    Thanks for your time.


    Stu
    Attached Files Attached Files

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

    Re: Sum an offset range where column criteria met.

    Hi,

    If I've understood you correctly, in G12:

    =SUM(C9:INDEX(C9:O9,,B3))

    Adapt the ranges as required for Agency 2.

    Regards
    Click * below if this answer helped

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

  3. #3
    Registered User
    Join Date
    02-14-2010
    Location
    Scotland
    MS-Off Ver
    MS Office 2013
    Posts
    35

    Re: Sum an offset range where column criteria met.

    Thanks for the response XOR LX,

    The added problem I have is that Agency 1 and Agency 2 could swap positions when the report is ran. Is there a way to incorporate this so that the formula dynamically sums the correct agency no matter which order it appears?

    Thanks

    Stu

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Sum an offset range where column criteria met.

    If you may change B12 to only "Agency 1":
    =SUM(INDEX($9:$9,MATCH(B12,$6:$6,0)+1):INDEX($9:$9,MATCH(B12,$6:$6,0)+$B$3))
    You may then fill down for Agency 2 et cetera.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

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

    Re: Sum an offset range where column criteria met.

    Or without B12 being changed, try in G12 then drag down:
    Please Login or Register  to view this content.
    Quang PT

  6. #6
    Registered User
    Join Date
    02-14-2010
    Location
    Scotland
    MS-Off Ver
    MS Office 2013
    Posts
    35

    Re: Sum an offset range where column criteria met.

    Hi guys,

    Spot on, two different answers that acheive the same goal.

    Thanks

    Stuart

+ 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. Replies: 4
    Last Post: 07-19-2013, 04:35 AM
  2. How to sum a range of offset ranges based on criteria
    By beaumonr in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-31-2012, 07:58 PM
  3. offset range to different column
    By dan_hibiki in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-21-2010, 10:02 PM
  4. Autofill Range offset by 1 column
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2008, 06:05 AM
  5. Replies: 2
    Last Post: 08-22-2005, 01:05 AM

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