+ Reply to Thread
Results 1 to 7 of 7

Looking up Specific Criteria in line item and doing a LookUP

  1. #1
    Registered User
    Join Date
    05-03-2017
    Location
    CA
    MS-Off Ver
    210
    Posts
    61

    Looking up Specific Criteria in line item and doing a LookUP

    Can you please assist in helping with my Transaction memo line items below. Please also see ID name and ID number below. I want to be able to have some sort of formula that can look into my Transaction memo and pick up the Vendor ID and its Vendor Name. As you can see though that not all Memo transactions formatting is not the same. And I cannot find any consistency within each line item. The only thing that is consistent is that Vendor ID# contains 10 digits and also the word "AmericanExpress"

    Can you please help since I have 100s of line items that are similar to this.

    Please see attachment.
    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 2403
    Posts
    44,022

    Re: Looking up Specific Criteria in line item and doing a LookUP

    Are you sure that you have quoted the correct ID No for LNID and IC Tickets???

    I used this to extract the 10 digit numbers:

    =IFERROR(LOOKUP(10^10,MID(SUBSTITUTE(A2," ","a"),ROW(INDIRECT("1:"&LEN(A2)-9)),10)/ISERROR(--MID(" "&A2,ROW(INDIRECT("1:"&LEN(A2)-9)),1))/ISERROR(--MID(A2&" ",ROW(INDIRECT("11:"&LEN(A2)+1)),1))),"").

    This can then be used to lookup the company name, like this:

    =INDEX($A$12:$A$16,MATCH(IFERROR(LOOKUP(10^10,MID(SUBSTITUTE(A2," ","a"),ROW(INDIRECT("1:"&LEN(A2)-9)),10)
    /ISERROR(--MID(" "&A2,ROW(INDIRECT("1:"&LEN(A2)-9)),1))/ISERROR(--MID(A2&" ",ROW(INDIRECT("11:"&LEN(A2)+1)),1))),""),$B$12:$B$16,0))

    But it returns two errors, where I think you have provided an incorrect 10 digit number...
    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.

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

  3. #3
    Registered User
    Join Date
    05-03-2017
    Location
    CA
    MS-Off Ver
    210
    Posts
    61

    Re: Looking up Specific Criteria in line item and doing a LookUP

    Please see attachment. As you can see the formatting for each line description is not same and that is where I am having problems. Like I do see the same ID code but since there is a space in between some it does not get picked up.
    Attached Files Attached Files

  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,022

    Re: Looking up Specific Criteria in line item and doing a LookUP

    Do the strings always end with Addenda: No Addenda??

  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 2403
    Posts
    44,022

    Re: Looking up Specific Criteria in line item and doing a LookUP

    If so...

    =INDEX($A$12:$A$16,MATCH(--RIGHT(SUBSTITUTE(SUBSTITUTE(A2,"Addenda: No Addenda","")," ",""),10),$B$12:$B$16,0))
    Attached Files Attached Files

  6. #6
    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,022

    Re: Looking up Specific Criteria in line item and doing a LookUP

    Last shot. Assuming the worst... this will also work with Addenda any_text_to_follow

    =INDEX($A$12:$A$16,MATCH(--RIGHT(SUBSTITUTE(LEFT(A2,SEARCH("Addenda",A2)-1)," ",""),10),$B$12:$B$16,0))
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-03-2017
    Location
    CA
    MS-Off Ver
    210
    Posts
    61

    Re: Looking up Specific Criteria in line item and doing a LookUP

    Thank you Glen both work perfect.

    Is it possible if you can explain a little about in lemain terms on what is exactly happening in this formula. (=INDEX(Sheet2!$E$2:$E$72,MATCH(--RIGHT(SUBSTITUTE(SUBSTITUTE(A2,"Addenda: No Addenda","")," ",""),10),Sheet2!$F$2:$F$72,0))

+ 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. Replies: 2
    Last Post: 12-14-2016, 12:20 AM
  2. VBA code to copy line items from form - overriding previous line item
    By dkostyan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2016, 11:19 AM
  3. [SOLVED] Oldest Item with specific Criteria
    By Alphabex in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-01-2016, 04:30 PM
  4. [SOLVED] Formula needed - line item of unique item matching criteria
    By NS4Excel in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-18-2015, 06:32 PM
  5. Need help: Excel VBA to moved Outlook mail item to a specific sub folder is Criteria is me
    By excelchamp25 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2014, 06:50 AM
  6. Combining multiple line items into one line item based on column.
    By mguz018 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2012, 07:22 PM
  7. [SOLVED] Lookup lowest value in a list for an item for a specific date
    By JungleJme in forum Excel General
    Replies: 5
    Last Post: 07-26-2012, 05:28 AM

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