+ Reply to Thread
Results 1 to 9 of 9

Index Match from Table AND Date

  1. #1
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    Post Index Match from Table AND Date

    Hi there,

    I already have a formula that searches a table for a match and then returns a value from another column, on the same row. I would also like the formula to match the date in another column.

    Notes for result:
    - Formula is for yellow cells in column E.
    - This formula currently searches range in columns M-V and returns the Cost of Sale in column I.
    - I'd like the month in column X to also match in the formula (I have added the month to column A as a potential helper).

    Essentially, I am trying to capture the Cost of Sale per unit for a given month.

    Desired Result:
    - Avocado January (cell E4) should return 3.26 (from I2)
    - Avocado February (cell E14) should return 3.34 (from I10)

    I'd really appreciate any help

    Many thanks,

    Danny
    Attached Files Attached Files

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

    Re: Index Match from Table AND Date

    One way:

    =FILTER($I$2:$I$20,(ISNUMBER(SEARCH(C4,$K$2:$K$20)))*(MONTH($X$2:$X$20)=A4))

    copied down. See file.
    Attached Files Attached Files
    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

  3. #3
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    Re: Index Match from Table AND Date

    Hi Glenn,

    Many thanks for the reply!

    When I transfer this formula over to my larger sheet, I'm having an issue with the "ISNUMBER(SEARCH" part of the formula as we have some product identifiers with matching characters but extra numbers at the beginning or end.

    For example: 10010001 and 910010001.

    Have you got any suggestions?

    Danny

  4. #4
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    Re: Index Match from Table AND Date

    A solution I found was to add a concatenate formula to the combined PLUs cell with " " at the beginning and end, and then add this same setup to cell that is searched.

    Perhaps you have a cleaner version.

    Danny

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

    Re: Index Match from Table AND Date

    Are the extra characters in the column C terms or the column K terms?

  6. #6
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    Re: Index Match from Table AND Date

    I added to both so there's always a blank character at the beginning and end.

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

    Re: Index Match from Table AND Date

    Post a few examples of EXACTLY what you mean by extra characters (in your sample sheet)

  8. #8
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    Re: Index Match from Table AND Date

    In the example sheet column K has pasted values, but these will be collected from a report I download. I have added the 'source' to AA for demonstration purposes. Column K concatenates a space before and after:

    Source - [10070003 | 00030005 | 60040005]
    Result - [ 10070003 | 100030005 | 60040005 ]

    I do the same for the Menu Items PLU in column C.

    This way the "ISNUMBER(SEARCH" of the formula will need to find an exact match and won't have the same problem as before (with PLU's like 10010001 and 910010001).

    I've updated the sheet for your reference.

    Perhaps there is another way to search for the exact number without the need for this added step. It works well though

    Danny
    Attached Files Attached Files

  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 2406
    Posts
    44,662

    Re: Index Match from Table AND Date

    OK. I'd dump all the helper columns and adjust my original formula:

    =FILTER($I$2:$I$20,(ISNUMBER(SEARCH(C4," "&$K$2:$K$20&" ")))*(MONTH($O$2:$O$20)=A4))

    see file.
    Attached Files Attached Files

+ 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. Use index and match to summaraze a date column onto another table
    By BedbathExpert in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-27-2018, 02:29 AM
  2. Replies: 14
    Last Post: 04-09-2015, 12:43 PM
  3. Replies: 2
    Last Post: 12-18-2014, 09:52 AM
  4. Replies: 3
    Last Post: 05-19-2014, 02:01 PM
  5. [SOLVED] Index Match Based on One Date Criteria, Table Contains Beginning Date and End Date
    By jcox1953 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-09-2014, 02:41 PM
  6. Index Match Match Formula DOESN'T WORK WITH TABLES/TABLE NAMES ??
    By Underling in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-04-2014, 09:01 PM
  7. [SOLVED] INDEX date that MATCH on date range, MATCH code(string)
    By Dahlia in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2014, 03:33 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