+ Reply to Thread
Results 1 to 5 of 5

Offset and sumif combined formula?

  1. #1
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Offset and sumif combined formula?

    Hello all, I need some help!

    Please see the sample attached.

    I am looking for assistance writing a formula (that site in Sheet 2 A2 etc) that looks down column A and finds all the data under "Resource Clocked 1" - In Sheet 1

    Then it looks at the data that is only under that heading and analyses a letter code in column C and then sums up a total for each letter code from column E.

    On sheet 2 I have the output table of what I am trying to achieve and have manually entered the results.

    I'm making it sound more difficult than it is I think but cant explain it very well, looking at the attached spread sheet and what I have coloured in red and what I am expecting will make it easier to understand.

    Thanks in advance

    BVG
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Offset and sumif combined formula?

    You can use this formula in B2:

    =IFERROR(SUMIFS(INDEX(Sheet1!$E:$E,MATCH($A2,Sheet1!$A:$A,0)+1):INDEX(Sheet1!$E:$E,MATCH("ed"&MID($A2,FIND(":",$A2)+1,4),Sheet1!$C:$C,0)-1),
    INDEX(Sheet1!$C:$C,MATCH($A2,Sheet1!$A:$A,0)+1):INDEX(Sheet1!$C:$C,MATCH("ed"&MID($A2,FIND(":",$A2)+1,4),Sheet1!$C:$C,0)-1),B$1),0)

    then copy across and down as required.

    Note that I have used INDEX, rather than the volatile OFFSET function, to generate the necessary ranges, and the formula returns zero if the Resource Clocked is not present.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,937

    Re: Offset and sumif combined formula?

    Try the attached.
    Attached Files Attached Files
    Bernie Deitrick
    Excel MVP 2000-2010

  4. #4
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Re: Offset and sumif combined formula?

    Quote Originally Posted by Pete_UK View Post
    You can use this formula in B2:

    =IFERROR(SUMIFS(INDEX(Sheet1!$E:$E,MATCH($A2,Sheet1!$A:$A,0)+1):INDEX(Sheet1!$E:$E,MATCH("ed"&MID($A2,FIND(":",$A2)+1,4),Sheet1!$C:$C,0)-1),
    INDEX(Sheet1!$C:$C,MATCH($A2,Sheet1!$A:$A,0)+1):INDEX(Sheet1!$C:$C,MATCH("ed"&MID($A2,FIND(":",$A2)+1,4),Sheet1!$C:$C,0)-1),B$1),0)

    then copy across and down as required.

    Note that I have used INDEX, rather than the volatile OFFSET function, to generate the necessary ranges, and the formula returns zero if the Resource Clocked is not present.

    Hope this helps.

    Pete
    Worked perfectly, thank you so much. Way beyond my skill level!

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Offset and sumif combined formula?

    Glad to help - thanks for the rep.

    Pete

+ 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. [SOLVED] Sumifs and Offset Combined
    By MyStix01 in forum Excel General
    Replies: 7
    Last Post: 07-02-2019, 09:54 PM
  2. [SOLVED] INDIRECT and OFFSET combined
    By Vanthus in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-01-2016, 07:33 AM
  3. [SOLVED] Sumif and offset formula that does not use arrays?
    By PaulG2015 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-01-2015, 03:55 PM
  4. SumIf formula or Sumif with pivottable combined question
    By mcgleeuw in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2015, 01:05 PM
  5. combined Sumif and Subtotal formula
    By CLoos in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-21-2013, 07:39 PM
  6. Offset, max, and row reference combined formula
    By lorber123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-04-2013, 04:28 AM
  7. Replies: 1
    Last Post: 04-22-2005, 12:06 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