+ Reply to Thread
Results 1 to 7 of 7

Merging INDEX & SUMPRODUCT formula

  1. #1
    Registered User
    Join Date
    10-27-2020
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    51

    Merging INDEX & SUMPRODUCT formula

    Hi Team,

    I'm trying to develop an universal formula instead of having 4 different ones.

    Please refer to the attached workbook as I'd like this formula to be applicable for all four departments but I'm not sure how to get it to search across different ranges.

    For example, Mark's assigned to Dept 1 but I'd need to see his item (Column C) even though he's scheduled for any other departments.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    One other thing would be if there is a way of identifying a clash if someone is double booked for a day?

    Thanks for all your help.

    Cheers,
    Kapi
    Attached Files Attached Files
    Last edited by kapi98; 05-15-2023 at 07:54 PM.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Merging INDEX & SUMPRODUCT formula

    Hello, kapi98.

    I managed to create dynamic ranges with this formula, for example, to replace range C5:C8:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Zero as the row number, delivers all four rows in the range.

    And the argument 4*QUOTIENT(COLUMNS($C$5:D$5)-2,2)+1 results 1 in the first two columns, i.e, the first column in the C5:O8 range, or C5:C8. And when you drag the formula to the third column, it results 5, i.e, the fifth column in the C5:O8 range, or G5:G8. And so on.

    So, your formula in B13 is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag across and down.

    I notice however, that the use of SUMPRODUCT to determine row number does not always yield desired result, as seen in column H for Jim. I don't know how you have come up with that formula. It seems to work in most cases, but unfortunately it fails in that particular case.
    I hope you figure it out and make good use of those dynamic ranges.

    Please check wb attached and let us know how it goes.

    Good luck!
    Attached Files Attached Files

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Merging INDEX & SUMPRODUCT formula

    Hi all-
    Here's a solution that uses the AGGREGATE function, which can mimic other functions - in this case SMALL(array,k) - with flexible error handling.
    In B13, copied across and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Note the use of a Named Range called Data; it refers to Sheet1!A5:Q8 (the data, obviously). This makes the formula a little shorter and way more readable, especially if the data is on another sheet, but just in case you really hate Named Ranges, here's the same formula with literal references.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    SChkpic.jpg
    Attached Files Attached Files
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  4. #4
    Registered User
    Join Date
    10-27-2020
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    51

    Re: Merging INDEX & SUMPRODUCT formula

    Hi leelnich,

    Thanks for your reply. It seems the conflict part works pretty well.
    However, I can't manage to set the dates right in my file. For whatever reason these dates allocate themselves for July, not May.

    Could you please investigate? I feel like I've tried everything.
    Unfortunately, I'm not able to change the current layout.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cheers!
    Attached Files Attached Files

  5. #5
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Merging INDEX & SUMPRODUCT formula

    It took me awhile to find it; your formula had a typo, so the finish date test was looking at the wrong cell. ("$A13" should have been "$A3")
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I noticed you tried SINGLE(array) in a couple of spots as a fix, but both of those clauses yield single values anyway. Here's a working version:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ps. This is NOT an array formula.
    Last edited by leelnich; 05-15-2023 at 04:34 AM.

  6. #6
    Registered User
    Join Date
    10-27-2020
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    51

    Re: Merging INDEX & SUMPRODUCT formula

    Thanks for your help, really appreciate it! I just added the reputation.

  7. #7
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Merging INDEX & SUMPRODUCT formula

    You're welcome, happy to help!

+ 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. INDEX & SUMPRODUCT formula
    By juca73 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-06-2020, 12:14 PM
  2. [SOLVED] Index match with sumproduct formula
    By felixpanganiban in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-21-2019, 03:13 AM
  3. Edit formula to remove #VALUE from INDEX SUMPRODUCT ROW formula result
    By JohnElliott in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-21-2019, 03:05 PM
  4. [SOLVED] SUM/INDEX/SUMPRODUCT array formula
    By esbencito in forum Excel General
    Replies: 6
    Last Post: 05-29-2018, 04:43 AM
  5. URGENT SUMPRODUCT INDEX Formula
    By Keelin in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-10-2014, 06:46 AM
  6. Merging a SUMPRODUCT and FREQUENCY Formula
    By Alice21 in forum Excel General
    Replies: 6
    Last Post: 03-05-2012, 12:43 PM
  7. Index/Match or Sumproduct formula
    By pauldaddyadams in forum Excel General
    Replies: 5
    Last Post: 01-19-2012, 11:32 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