+ Reply to Thread
Results 1 to 43 of 43

Help with Index Match Function (or other function)

  1. #1
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Question Help with Index Match Function (or other function)

    Hey folks, thanks for any help in advance!

    Also, in advance, (as this is my first time posting here), I may over explain and I apologize, I just want to make sure you get a good visual representation.

    I'm working on a document where I have multiple sheets pulling data from our database (PO Table, Work Order Table, ...etc)

    Right now I'm trying to index match using multiple criteria. I want to index the PO number from the PO table onto the CC Data table, but only if both the dates and the amounts match.

    Perhaps an index match function isn't the best route to take here, so I'm open to suggestion.

    CC Data Table example:
    A B C D
    Date Name Credit PO#
    09/04/2019 Alldata Corp 310.00

    PO Table example:
    A B C D E F G
    disp-no Po-no Name Po-date Term-code Remit-vendor Open-value
    291962 80135 Roofing Supply of Knoxville RS 9/4/2019 DUE 4533 150

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with Index Match Function (or other function)

    Hi and welcome to the forum

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Thanks! Here's a simplified version with only two sheets and only a small fraction of the data. Hopfully this helps?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Also, I tried to do this before, but wasn't sure how to upload attachments. Thanks for the help with that. lol

  5. #5
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    I've tried nesting an AND statement inside of the index match function, and either it doesn't work, or I'm doing it wrong, (likely the latter). I've also tried just doing "=IF(AND(this=this,this=this),1,0)" however, because it's going across two different sheets within the document, it's not returning the way I want it to. Also, I didn't really expect that to function the way I wanted it to, to begin with. That function breaks down really quickly over tens of thousands of pieces of data - lol

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with Index Match Function (or other function)

    Hi,

    Put the formula

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

    in E2 of the CC Table

    and in a new helper column I in the PO Table
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Thanks for that -- it appears to be giving me the row number rather than the PO number in the E:E on the CC Table.
    Perhaps I need to format the data differently? In the PO table it's giving values like this "43712150"

  8. #8
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Help with Index Match Function (or other function)

    Try this in D2 and pull down:
    Please Login or Register  to view this content.
    This tests against the date, Name, and credit values all exactly matching a row somewhere on the other table, and returning the sum of POs that are exact matches across all three.

    Non-matches will return the number zero instead of the text string "No PO", but I assume that will be sufficiently intuitive to not need any wrapping to handle.

    Note this rests on two assumptions:
    1) PO numbers are numbers (they are actually stored as text in your table but I've forced them to assess as numbers), so if it's something like "80070-A" instead of "80070" this will not work.
    2) Because this adds up all matching POs, this will deliver nonsense if there happen to be more than one exact match. (Via the same mechanism that delivers zero as the result for no matches).
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  9. #9
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Help with Index Match Function (or other function)

    CC TABLE

    D2=IFERROR(INDEX(Table1[Po-no],MATCH([@Name]&[@Date]&[@Credit],Table1[Name]&Table1[Po-date]&Table1[Open-value],0)),"NO PO")

    control+shift+enter

    copy down

  10. #10
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Yeah, the numbers are stored as text because that's how they are stored in the database, (this data is being pulled directly from our SQL server), I don't know why the devs of the database program we use decided to store them as text, but they did. It makes things like this a nightmare for me because I always forget about that. lol

  11. #11
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    This works, but when I change from " 'PO Table'!$B$2:$B$300 " to " 'PO Table'!B:B", ...etc, it no longer works. This is an on-going project where new data will be coming in every day, so I don't really want to limit it to a number, especially as of right now there are several thousand rows of data. This formula also seems to have a REALLLYYY slow calculate time, which really makes this whole report run like butt. :/

  12. #12
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Even when changing this to the correct table names, I seem to only get errors. I can't get this to work at all, unfortunately.

  13. #13
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Any other thoughts? What Richard put seems to work the best, however, It's not showing the PO number, only the row number.

  14. #14
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Help with Index Match Function (or other function)

    All ranges must be the same size. It is better not to use full-column references with SP - even limiting it to 50,000 or 100,000 rows will significantly improve the calculation time.

    If you concatenate columns D C and G in a helper column, then you could use SUMIFS, which should be quicker still.

    Hope this helps.

    Pete

  15. #15
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    I see! You're right, that dramatically improved time. Thanks a lot! I think this will work for now. You all have been a great help! Thanks! I don't fully understand how that formula works, I'm going to have to research a fair amount, but it works, so that's all that matters, I suppose. lol

  16. #16
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Actually one last thing, is there a way to do the same thing but on the PO Table?
    To explain what's happening here, the PO table is pulling from our database, the CC table that's there is pulling from our bank. My boss wants me to get this report set up in such a way that we can tell if the credit cards are being reconciled the correct way in the database, because it seems very much like they aren't.
    I just got off of the phone with him, what he asked was can we get it set up so that on the PO table, there's a column that shows whether or not the CC was reconciled correctly.
    So, if it matches, instead of pulling over the PO number, it would just show a 1 and a 0 or something.

    I'm super sorry, I feel like I've been a pain in the rear.

    Thanks again for everything!

  17. #17
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Help with Index Match Function (or other function)

    try

    cc table

    D2=IFERROR(INDEX(Table1[Po-no],MATCH([@Name]&[@Date]&[@Credit],Table1[Name]&Table1[Po-date]&Table1[Open-value],0)),"NO PO")

    control+shift+enter copy down

    PO TABLE

    I2=--NOT(ISNA(MATCH([@[Po-no]],Table2[PO'# Index Test],0)))

    copy down

    0 code no match

    1 code match
    Last edited by CARACALLA; 09-05-2019 at 04:59 PM.

  18. #18
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Caracalla, this just produces all zeros on the PO table.

  19. #19
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Help with Index Match Function (or other function)

    This is my file
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Even looking at yours, it doesn't seem right, perhaps I'm seeing something wrong. There are 10 on the CC table with PO numbers, but only 9 matching on the PO table?

  21. #21
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Help with Index Match Function (or other function)

    Because in cc table

    08/27/2019 Refco supply 119.63 79993


    08/27/2019 Refco supply 119.63 79993

    is double

  22. #22
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Ohhhhh. I see. Like I said, I'm probably seeing something wrong! haha

    I'll see if I can get this working on the real version, I don't know why I was having problems with it. lol

  23. #23
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Soooo, when I put in your formula it just throws out "no po" for everything. I genuinely don't understand. *scratches head*
    I did have to change it to match the correct info, but it's still throwing errors.

    =IFERROR(INDEX(Table_Query_from_Davisware[@[Po-no]],MATCH([@Name]&[@Date]&[@Credit],Table_Query_from_Davisware[@Name]&Table_Query_from_Davisware[Po-date]&Table_Query_from_Davisware[Open-value],0)),"NO PO")

  24. #24
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Help with Index Match Function (or other function)

    Attach the real file

  25. #25
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Can I remove it right after? It's got a lot of customer data on it.

  26. #26
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with Index Match Function (or other function)

    Quote Originally Posted by bdrake View Post
    Can I remove it right after? It's got a lot of customer data on it.
    You can remove a file whenever you want. Better still anonymise it. We don't mind how many M. Mouse, or D. Ducks you have or even D Trumps for that matter.

  27. #27
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Help with Index Match Function (or other function)

    Have you confirmed with control + shift + enter?

  28. #28
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    I have confirmed CTRL, Shift, ENT. I'm working on anonymising right now, I'll have it to you in a moment.

  29. #29
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    ugh - I'm trying to get the file size low enough to get it to you - lol.
    The max file size is 1MB, this is 18MB lol

  30. #30
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    This just apparently isn't possible - I just removed several hundred thousand rows of data - still too big. lol

  31. #31
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with Index Match Function (or other function)

    How many rows do you have.

    We probably only need 100 or so, just as long as they are representative. If you've got an 18 Mb file then that suggests you've still got thousands of rows,
    Check the last used cell on each sheet with {End}{Home}
    It's not been unknown for a row of formulae to have been accidentally copied down to the very last row.

    If you can get down to even 9 Mb then you can save that as a .xlsb file which will upload.

  32. #32
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Every time I try to upload the xlsb it fails.

  33. #33
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with Index Match Function (or other function)

    How big is it?

  34. #34
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    it's only 2.71MB

  35. #35
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with Index Match Function (or other function)

    ...and is the 2.7 Mb file a .xlsb file? If so it should upload.
    The only other option is to put it into a google drive folder and share the link with us.

  36. #36
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Yeah, for some reason I keep getting an error on the .xlsb - here's a link to Drive (this is the full version with names and addresses redacted) --LINK REMOVED--
    Last edited by bdrake; 09-10-2019 at 02:35 PM.

  37. #37
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Hey there! Sorry to bother, I added a link to this, hopefully you can get it to work? :/

    Thanks so much!

  38. #38
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with Index Match Function (or other function)

    Whilst I can open the file it's just too big, making it very very slow for testing and not something I wish to do.

    Please refer back to post #31 where I said we only needed a representative sample of rows. You have over 40000 rows on one sheet and 60000 on another.
    That's completely unnecessary for testing a solution so reduce the file to a 100 rows or so and then upload it. Maybe we can then help further.

  39. #39
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Gotcha, sorry! I'm getting that a done now.
    I'll have it uploaded here in a moment.

  40. #40
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    Lets try this one! This is the exact same document I'm using, the only difference is the date range is smaller and the names/addresses have been obfuscated.

    Thank you again. <3

  41. #41
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with Index Match Function (or other function)

    With a helper column on the CC table, in M2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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




    and a helper column on the PO Table in J2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This matches on Data and amount - as per your OP.
    If you need to include the name then add the name columns into both the M2 & J2 formulae

  42. #42
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    That's an elegant solution! I really like that, and it works really well! Do you have an idea on the second question I had, which is making the PO table display a 1 or 0 (or any other true or false value) if there's a CC payment that matches?
    Basically the same thing here did here, only on the PO side.

  43. #43
    Registered User
    Join Date
    09-05-2019
    Location
    Knoxville, Tennessee, USA
    MS-Off Ver
    2016 365 Business
    Posts
    28

    Re: Help with Index Match Function (or other function)

    What I did for now is "=COUNTIF(I:I,'CC Table'!L:L)"
    There are a few that have duplicate values that show a "2", but for the most part this gives me the "true,false" that I was looking for on the PO table.
    If you have a different solution, that would handle this a little more gracefully, I'd greatly appreciate it, however, this seems to get me going from here.

    My boss really wants something that shows words, I suppose I could do an if statement saying if 0 "no cc" and if anything else show something else. I dunno, yet.

    In any case, thanks so much for all of your 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. Nesting and Index and Match function inside an IF function
    By breckleeb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-29-2016, 11:06 AM
  2. [SOLVED] Embed left function in match/index function
    By Kyle18 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-12-2016, 05:17 AM
  3. Replies: 1
    Last Post: 06-10-2015, 12:56 PM
  4. Need help nesting an index/match function within a Vlookup function.
    By Christopher135 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2013, 06:16 PM
  5. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  6. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  7. [SOLVED] Emulate Index/Match combo function w/ VBA custom function
    By Spencer Hutton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2005, 01:06 PM

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