+ Reply to Thread
Results 1 to 7 of 7

Year to date to week - Index Match & Sum Ifs function?

  1. #1
    Registered User
    Join Date
    02-07-2018
    Location
    Shanghai, China
    MS-Off Ver
    Excel 2013
    Posts
    6

    Year to date to week - Index Match & Sum Ifs function?

    Hello Everyone!

    I am new to the Excel-community and just recently I struggled with setting up a formula, that shows the sum of the year to date numbers of the past and current month.
    In the current month it should be possible to differentiate until which week the sum should be drawn (Week 1, 2,3 and 4).
    I tried with a combination of a Index Match function and Sum if function, but I could not find the right way..

    To make the situation a bit clearer:

    'Database':

    Country Week Jan Feb Mar
    China Week 1 1000 2000 400
    China Week 2 400 750 700
    China Week 3 1200 3000 2100
    China Week 4 800 1200 300

    'Output table':

    Month: February

    Country Week 1 Week 2 Week 3
    China 300 X

    Assuming week 2 in February has just passed by, the goal is to show the sum of January and Week 1 & 2 of February below 'Week 2'.

    Does anyone have an idea? I'd be very grateful for any advice.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Year to date to week - Index Match & Sum Ifs function?

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-07-2018
    Location
    Shanghai, China
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Year to date to week - Index Match & Sum Ifs function?

    Hello Ali,

    thank you very much for the advice and the quick response!

    Please find attached the example of what I am trying to achieve.

    Assuming that the second week of February has just passed, the 'output table' in week 2 shows the sum of the January weeks plus week 1 & week 2 of February.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-07-2018
    Location
    Shanghai, China
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Year to date to week - Index Match & Sum Ifs function?

    Anyone an idea?

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Year to date to week - Index Match & Sum Ifs function?

    Hello JonasH. 123 and Welcome to Excel Forum.
    This proposed solution utilizes a helper table which may be moved and/or hidden for aesthetic purposes (in the attached file it is placed on Sheet 1).
    The formula that populates the helper table is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The array entered formula* that populates the Year & Week to Date table is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    The Year & Week to Date table has conditional formatting applied to hide zero values.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    02-07-2018
    Location
    Shanghai, China
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Year to date to week - Index Match & Sum Ifs function?

    Dear Jete MC,

    I want to thank you sincerely for taking your time on this - the formula works perfectly :-)

    Best regards!
    Jonas

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Year to date to week - Index Match & Sum Ifs function?

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. IF function with YEAR and INDEX MATCH? How to?
    By overhage in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-03-2017, 02:37 AM
  2. Replies: 5
    Last Post: 04-11-2017, 09:23 AM
  3. [SOLVED] Index Match with multiple criteria - Return top sellers for certain week from year data
    By albanhac in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2016, 06:28 AM
  4. [SOLVED] Match function in VBA ignoring year of date
    By alviniac in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-12-2015, 05:20 PM
  5. [SOLVED] Get the date of saturday in a week from a week number / year
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2015, 06:56 PM
  6. [SOLVED] MATCH-INDEX function for retrieving specific year data in a table...
    By portsample in forum Excel General
    Replies: 4
    Last Post: 12-16-2014, 04:48 PM
  7. [SOLVED] Calculating a Date Based on Year, Week Number and Day of the Week
    By amy in forum Tips and Tutorials
    Replies: 1
    Last Post: 08-23-2005, 11:42 AM

Tags for this Thread

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