+ Reply to Thread
Results 1 to 9 of 9

Index Match Formula Returning Incorrect Values

  1. #1
    Registered User
    Join Date
    03-22-2024
    Location
    London
    MS-Off Ver
    365
    Posts
    3

    Index Match Formula Returning Incorrect Values

    Hi,

    I am working on a summary cashflow document to pull together the spend from various projects into one summary page. I have an index match formula trying to pull the data through from each projects' tab to the summary page to match the correct date with spend type. This has worked perfectly for my BACS columns but for my CC and ACC columns it will only pull through the value of the first piece of data and I can't work out why. Is anyone able to help? I have attached the file below, the cells where the issues begin are J4 and K4 (F-I4 is all the correct data).

    Cashflow.xlsx

    Thanks,
    Harry

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Index Match Formula Returning Incorrect Values

    The root cause of all your problems is that you are using merged cells, which is never a good idea.

    When you merge cells, only the first cell contains the data for reference purposes. For example, you merged G2, H2, I2. G2 has the date. H2 and I2 are empty and will return the null string if referenced in formulas. You are referencing these empty cells, apparently assuming they also contain the date.

    The formula in H4
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The formula refers to H2, but H2 is part of merged cells (G2:I2) and so H2 is empty.

    You have a similar problem on the data sheet. The dates are in merged cells. So the first date is in E4, and the cells it's merged with, F4 and G4, are empty.

    So the MATCH expression is looking for a match on values in two different columns. It looks for a match of "CC" & <the date>. But as I described, the date that MATCH is looking for is always blank for CC and ACC, so it will find the first match of a blank date, which will always be column F for CC and G for ACC, no matter what date you see on the sheet.

    To fix this, you must either:

    1. Unmerge all the cells and repeat each date three times. This is what I would do.

    2. Rewrite all your formulas to refer to the first cell in each set of merged cells, i.e., change H2 to G2. Then the formula in column I would change I2 to G2. Repeat for all subsequent formulas. Also change all the formulas to find the date first in row 4 of the data sheet, and then navigate from there to the appropriate item/service (BACS, CC, ACC) instead of doing one MATCH to find them both at once.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    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,916

    Re: Index Match Formula Returning Incorrect Values

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so. Cross-posts are allowed but you must provide a link to your posts on other sites.

    Please see Forum Rule #7 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. As you are new here, I shall do it for you this once: https://www.mrexcel.com/board/thread...g-n-a.1256008/)
    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.

  4. #4
    Registered User
    Join Date
    03-22-2024
    Location
    London
    MS-Off Ver
    365
    Posts
    3

    Re: Index Match Formula Returning Incorrect Values

    Thanks Jeff! I don't know why it hadn't crossed my thoughts to unmerge on both tabs!
    Last edited by AliGW; 03-22-2024 at 11:27 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  5. #5
    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,916

    Re: Index Match Formula Returning Incorrect Values

    You need to acknowledge post #3 - have you read and understood it?

  6. #6
    Registered User
    Join Date
    03-22-2024
    Location
    London
    MS-Off Ver
    365
    Posts
    3

    Re: Index Match Formula Returning Incorrect Values

    Apologies, yes read and understood

  7. #7
    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,916

    Re: Index Match Formula Returning Incorrect Values

    Thank you.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Index Match Formula Returning Incorrect Values

    Quote Originally Posted by hconn View Post
    Thanks Jeff! I don't know why it hadn't crossed my thoughts to unmerge on both tabs!
    You must unmerge and repeat each date in three columns (you could use an = formula). Do you have it working? If so, please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking addreputationiconsmall.jpg below their name.

  9. #9
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Index Match Formula Returning Incorrect Values

    Better formula for the first monday of the month.

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

    And this is the formula for you to use in row 4 as 6StringJazzer said.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by DJunqueira; 03-22-2024 at 01:52 PM.

+ 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] Problems with INDEX, MATCH, MATCH returning incorrect values
    By Paul103 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-03-2018, 05:16 PM
  2. [SOLVED] Index + Match returning incorrect data
    By solleksfan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-12-2017, 10:27 AM
  3. [SOLVED] INDEX & 2x MATCH returning incorrect values
    By Dan_B in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-06-2017, 06:01 AM
  4. [SOLVED] Index Match returning incorrect values
    By SomeDude0nline in forum Excel General
    Replies: 2
    Last Post: 07-23-2014, 10:20 AM
  5. Index match returning incorrect values
    By Mrpussalia in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2014, 10:55 PM
  6. Index Match returning incorrect date
    By cartman88 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-04-2013, 05:34 AM
  7. [SOLVED] Index & Match returning incorrect value. Arrays fixed and exact match used.
    By SDes in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-07-2012, 08:29 PM

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