+ Reply to Thread
Results 1 to 5 of 5

Formula to add cells based on criteria

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    3,821

    Formula to add cells based on criteria

    Hello:

    Please refer to attached file.
    I have monthly data as shown in Sheet1.
    Pls refer to sheet2.
    Depening on value in cell c1 (month #), i need formula in in cell D3 and D4 to add 3 months of data for items listed in column A.

    I have shown manually entered result.

    Let me know if you have any questions.
    Thanks.
    Riz
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2013 (Win 10 - Work) & 365 Subscription (Win 10 - Home)
    Posts
    20,160

    Re: Formula to add cells based on criteria

    In D3 copied down:

    =SUM(OFFSET(Sheet1!$K5,0,0,MATCH(Sheet2!$A$3,Sheet1!$J$5:$J$6,0),C$1))
    Last edited by AliGW; 07-14-2018 at 03:05 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    STOP PRESS: Forum Rules Updated September 2018! Please read them here.
    If anyone has helped you towards solving a problem, then you can thank them by clicking on their reputation star bottom left.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2013 (Win 10 - Work) & 365 Subscription (Win 10 - Home)
    Posts
    20,160

    Re: Formula to add cells based on criteria

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  4. #4
    Forum Guru Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Northern Ireland
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    18,977

    Re: Formula to add cells based on criteria

    A non-volatile alternative...

    =SUM(Sheet1!K5:INDEX(Sheet1!K5:V5,,Sheet2!$C$1))
    Glenn



  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    3,821

    Re: Formula to add cells based on criteria

    Hello Ali:

    Thanks, its works great

    Riz

+ 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