+ Reply to Thread
Results 1 to 4 of 4

Need to lookup a value in a table and sum only the values relating to the month

  1. #1
    Registered User
    Join Date
    10-18-2021
    Location
    London, England
    MS-Off Ver
    365
    Posts
    10

    Need to lookup a value in a table and sum only the values relating to the month

    Hi,

    I have been scratching my head over this. I want to basically summarize daily data into monthly which would normally be a sumif, but I also want it to look up the Row first. In the example in bold (and attached) below I want a formula that looks up the row that the Apple is in and then add up all the values in Oct.

    Oct Oct Oct Nov Nov Nov Dec Dec Dec
    Apple 1 1 1 1 1 1 1 1 1
    Banana 2 2 2 2 2 2 2 2 2
    Carrot 3 3 3 3 3 3 3 3 3

    Oct Nov
    Apple 3 3
    Banana 6 6

    Any help or even just the formula to use would be great
    Attached Files Attached Files
    Last edited by deadparrot; 10-18-2021 at 06:36 AM. Reason: Add excel example

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,183

    Re: Need to lookup a value in a table and sum only the values relating to the month

    Set B7 to first of month e.g 01/10/2021 and format as "mmm" C7 01/11/2021

    in B8

    =SUMPRODUCT(($B$3:$J$5)*($B$2:$J$2>= B$7)*($B$2:$J$2<=EOMONTH(B$7,0))*($A$3:$A$5=$A8))

    copy down and across
    Last edited by JohnTopley; 10-18-2021 at 06:19 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,202

    Re: Need to lookup a value in a table and sum only the values relating to the month

    Try this:

    =SUMIF($B$1:$J$1,B$7,INDEX($B$3:$J$5,MATCH($A8,$A$3:$A$5,0),0))

  4. #4
    Registered User
    Join Date
    10-18-2021
    Location
    London, England
    MS-Off Ver
    365
    Posts
    10

    Re: Need to lookup a value in a table and sum only the values relating to the month

    That is amazing. It has been keeping me up at night! Thanks both for such a fast response.

+ 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: 1
    Last Post: 01-04-2020, 02:44 PM
  2. Lookup several elements from a table updated each month
    By Charlie98 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-27-2019, 07:02 AM
  3. Relating values to $
    By lucas257 in forum Excel General
    Replies: 1
    Last Post: 01-25-2017, 11:42 AM
  4. [SOLVED] Using IF functions relating to the date of the month
    By daveneedshelp123 in forum Excel General
    Replies: 4
    Last Post: 08-03-2015, 06:38 AM
  5. [SOLVED] Sum all Values in 1 column relating to 2 specific values in 2 other columns
    By Craig.F in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-19-2015, 08:13 AM
  6. Input based on three values and lookup the corresponding month number.
    By sha123 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-03-2014, 12:07 PM
  7. [SOLVED] adding up figures relating to a range of cells with a month in
    By littlefoot in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-17-2012, 07:35 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