+ Reply to Thread
Results 1 to 26 of 26

Cross Check Columns for Index Match Match

  1. #1
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Cross Check Columns for Index Match Match

    Hello,

    My first time, so apologies in advance for any forum etiquette mistakes.

    Brief Background:
    I have a table of data which is updated monthly, and I have to update another excel document manually. For this exercise I have created a small dumby document but it still has the same principles.
    I have developed a formula which extracts a cell value and puts the value into another table, provided a given integer (serial number) is specified.

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


    Problem:
    I will try my best to explain, however I ask please view the attached so it will make more sense.
    Currently my INDEX MATCH MATCH is only extracting costs from line 1 to 6 (see table 1 below). This is an issue as when I seek information from line 8 "Vauxhall|5|Silver|1002yum|£8,465.25", my INDEX MATCH MATCH will never retrieve this as instead it will take line 2. This is due to the serial numbers being the same.

    What I require is an initial formula that cross checks the three columns (car, door and colour), before it then looks for the serial number. My first obstacle is matching a partial string with a string in the car column. All I have managed so far is:

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


    First Table
    Car Door Colour S/N Cost
    Ford 5 Silver 1001ttcc £5,998.78
    Ford 5 Silver 1002yun £3,454.56
    Ford 5 Black 1003uyt £4,875.45
    Ford 3 Black 1004ret £3,460.34
    Ford 3 Silver 1005dft £8,973.34
    Ford 3 Black 1006hgt £8,778.23
    Vauxhall 5 Black 1001ttcc £3,785.45
    Vauxhall 5 Silver 1002yun £8,465.25
    Vauxhall 5 Black 1003uyt £1,549.35
    Vauxhall 5 Silver 1004ret £1,237.56
    Vauxhall 3 Silver 1005dft £7,895.64
    Vauxhall 3 Silver 1006hgt £5,498.36

    Second Table
    Vauxhall 5 Door Silver
    1002 3454.56 <- should be £8,465.25 (from line 8 in table 1)
    1004 3460.34 <- should be £1,237.56 (from line 10 in table 1)

    Thank you in advance, and I hope I have made this as clear as possible.

    Harr
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Cross Check Columns for Index Match Match

    k8=LOOKUP(2,1/(($B$4:$B$18&" "&$C$4:$C$18&" "&$C$3&" "&$D$4:$D$18=$J$7)*(LEFT($E$4:$E$18,4)=$J8&"")),$F$4:$F$18)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

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

    Re: Cross Check Columns for Index Match Match

    Try

    =INDEX($F$4:$F$18,MATCH(SUBSTITUTE($J$7&$J9 &"*"," ",""),$B$4:$B$18&$C$4:$C$18&$C$3&$D$4:$D$18&$E$4:$E$18,0))

    Enter with Ctrl+Shift+Enter
    Last edited by JohnTopley; 12-30-2015 at 08:53 AM.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    For what it's worth... another variant, also an array formula, enter with CTRL + SHIFT + ENTER:

    =INDEX($F$4:$F$18,MATCH($J$7&J8,$B$4:$B$18&" "&$C$4:$C$18&" Door "&$D$4:$D$18&LEFT($E$4:$E$18,4),0))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Cross Check Columns for Index Match Match

    And another one, based on the observation that the 4 digits at the start of the serial number are unique within any given brand. i.e. you would never have 2 Fords with a serial number staring 1001.

    =SUMPRODUCT((B4:B18&" "&$C$4:$C$18&" "&LEFT($E$4:$E$18,4)&" "&$D$4:$D$18=SUBSTITUTE($J$7,"Door",J8))*$F$4:$F$18)

    Or, if practical, a change to the format of table 2.

    J7: 1002
    K7: Vauxhall
    L7: 5
    M7: Silver
    N7: =SUMIFS($F$4:$F$18,$B$4:$B$18,K8,$C$4:$C$18,L8,$D$4:$D$18,M8,$E$4:$E$18,J8&"*")

  6. #6
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Hello,

    Thank you for your suggestions. They all work in the dumby document I created, however when trying to replicate the formula where I actually need it, its not working

    There are two reasons why I am struggling apply these formulae:
    1. I cant specify a value in the formula i.e. "Door", instead I need it to be a variable. - Thanks Glenn and Jason, my fault for not mentioning in my OP.

    2. I notice how we are trying to sum the headings in table one into one string and then confirm whether it equals the string heading in table 2. I didnt realise this method would be used as otherwise I would have mentioned the following: The heading for table 2 will be different i.e. "RVAUXHALL 5 DOOR SILVER, £m".
    This is why I was trying a MATCH method, but I am self taught off the web so not sure if what I was trying below is achievable.

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


    Sorry for the aggravation, I realise now I should of tried to mirror my actual work moreso in the dumby doc.

  7. #7
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Hello,

    Thank you for your suggestions. They all work in the dumby document I created, however when trying to replicate the formula where I actually need it, its not working

    There are two reasons why I am struggling apply these formulae:
    1. I cant specify a value in the formula i.e. "Door", instead I need it to be a variable. - Thanks Glenn and Jason, my fault for not mentioning in my OP.

    2. I notice how we are trying to sum the headings in table one into one string and then confirm whether it equals the string heading in table 2. I didnt realise this method would be used as otherwise I would have mentioned the following: The heading for table 2 will be different i.e. "RVAUXHALL 5 DOOR SILVER, £m".
    This is why I was trying a MATCH method, but I am self taught off the web so not sure if what I was trying below is achievable.

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


    Sorry for the aggravation, I realise now I should of tried to mirror my actual work moreso in the dumby doc.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    So will it always be a single character (R or whatever) before the manufacturer's name?

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    If it is ALWAYS a single character, try this array formula:

    =INDEX($F$4:$F$18,MATCH(MID($J$7,2,FIND(",",$J$7)-2)&J8,$B$4:$B$18&" "&$C$4:$C$18&" "&$C$3&" "&$D$4:$D$18&LEFT($E$4:$E$18,4),0))

    Array Formulae are a little different from ordinary formulas in that they MUST be 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 the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly braces yourself - it won't work...

    If this is still incorrect, please upload a REPRESENTATIVE sample of your data

  10. #10
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Hi Glenn,

    Thanks for your prompt responses, sorry for the delay I had to create the attached and all of this code is very new to me. The attached is essentially what I am working with, excluding actual names and figures, so hopefully now you will be able to help more easily. Please do not feel all previous suggestions were to no avail, as they have certainly help me understand a lot more.

    As you will see within the document, it is my intention to create an in-doc universal formula that can be dragged down, plus the total characters in a headings are changing accordingly. Thats why I am avoiding specific values and trying to stick to variables.
    Attached Files Attached Files

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    Is the content of column A always going to be the last 3 characters in the FIRST word in J9 and J20?? If not, is there a universal rule that can be applied? Currently, in sheet B, you have RDEL from DEL and AME from AME.

  12. #12
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Yes, column A will always be just "AME" and "DEL".

    Sorry, but I dont quite understand what you mean by universal rule.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    In J9 you have RDEL. Can it sometimes be RRDEL or WEDDEL, or DELRR, or even just DEL? What I'm trying to find out is what possible differences can there be between what is in column A and the first "word" in J9 or J20, etc....

  14. #14
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Ah my apologies,

    The "R" is for Resource, so it will only ever be RDEL.

    Sheet 1 - > Sheet 2
    AME - > AME
    DEL - > RDEL

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    I had to take a few liberties with Sheet 2's layout. I moved the BIG headers into column I,away from the minor headers, and moved "Full Year" up a row. The formula MUST start in L10, so that it can pick up the first BIG header in I10. However, now you have one formula that can be dragged down the entire column. The stuff in column N is to remind me what I did, in the event that further changes are needed. It can be deleted. one last thing, on your rel, real sheet; how many rows are there likely to be. One disadvantage of these concatenation typre formulae is that they can be a bit slow if it has too many rows to deal with. (000s). If that's the case, let me know.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Hi Glenn,

    Many Thanks for your perseverance with this, it works great! Just to incorporate it in my real docs now.

    The formula will be covering about 200 rows

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    In that case it should be just fine. Let me know how it works out...

  18. #18
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    After a few issues I managed to finally implement your formula, again many thanks!

    I will change this thread to solved, but before we leave this to the archives I was wondering if your method was the only approach? For instance, I was trying to Match a string [DEL] which had its characters within another string [RDEL PROGRAMME CASH, £m].

  19. #19
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    Heavens, no. There will be a myriad of other approaches. I just picked one that I thought would be easiest and stuck with it, as the situation grew more complicated!! Depending on how I feel, I don't always look at the "formula that didn't work" as it can, sometimes, send you off on all sorts of tangents. I prefer to come to it cold and take it from there.

  20. #20
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Haha okay, my apologies for making it so complicated as we went along, I thought my dumby doc would have simplified it.

    I am very grateful as I now finally have a formula which will cut down a lot of time on transferring information, but in future, if I didnt want to add an extra column which substituted the old title with a new title (column N in your doc), is it possible to use just one formula in one cell to do as I desired? If it is, could you suggest possible articles or functions I can read into please.

    Thanks,

  21. #21
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    You didn't read what I said back at post 15

    "The stuff in column N is to remind me what I did, in the event that further changes are needed. It can be deleted. "

    So, delete column N. It was only there to remind me what i was doing, in case I needed to unpick the whole thing.

  22. #22
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Sorry Glenn,

    When I deleted column N the formula no longer worked, so I decided to proceed and use your method anyway.

  23. #23
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Cross Check Columns for Index Match Match

    Please excuse me.. I passed a "significant" birthday a few days back and the brain cell loss has accelerated hugely in the last 48 hrs. You're right!! here's an alternative. There is a formula in column K as well that makes things right (text colour set to white, so you don't see it) and a slight variant of the previous formula in column L.
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Aha, this is great! No problem at all, thank you for taking the time to help me with this.

    Have a Happy New Year!

  25. #25
    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
    28,206

    Re: Cross Check Columns for Index Match Match

    @Glenn,
    Wait until you reach 40 then you'll really see acceleration!

    Happy New Year

  26. #26
    Registered User
    Join Date
    12-30-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    13

    Re: Cross Check Columns for Index Match Match

    Hi All,

    Sorry for continuing this solved thread, but I thought I would first, show the formula to all, and second, I added something new to the formula which I thought should be shared.

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


    It will return the last (bottom-most) text entry in the range I$10:I15: - Glenn, I hope you agree that this would be easier rather than having column K occupied?

    Attached is the file with the updated formula in use.

+ 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] Using Index & Match (or similar) to check two columns for a match
    By dvs in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-30-2015, 07:07 PM
  2. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  3. Index/Match but the second match criteria >0 regarding 3 columns
    By Ben2487 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-29-2014, 12:08 PM
  4. Index Match Match with rank check
    By Jonathan9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2014, 11:46 AM
  5. [SOLVED] Match Issue - Consolidate Columns of Data With Match/Index/etc?
    By excelsior123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2014, 05:14 PM
  6. [SOLVED] Index Match (I think) cross checking multiple criteria
    By jimbokeep in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2013, 11:55 AM
  7. Index/Match cross search and extract
    By taccca in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-03-2009, 07:13 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