+ Reply to Thread
Results 1 to 11 of 11

Vlookup first two words in the cell

  1. #1
    Registered User
    Join Date
    09-11-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    42

    Vlookup first two words in the cell

    could some one help me how to do vlookup if i want to matchc first two words in the cell

    for example
    allianz insurance corp = allianze insurance

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Vlookup first two words in the cell

    Instead of simple =VLOOKUP(A1, table, 2, FALSE) use:

    =VLOOKUP(TRIM(LEFT(SUBSTITUTE(A1," ",REPT(" ",255),2),255)), table, 2, FALSE)

  3. #3
    Registered User
    Join Date
    09-11-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Vlookup first two words in the cell

    No it didnt solve my problem

    iferror(index(slx!$d:$d,match($c4&"*"&$d4,slx!$b:$b&slx!$j:$j,0),),(index(slx!$d:$d,match($c4&"*"&$d4,slx!$c:$c&slx!$j:$j,0),)))

    i m using this array to match... But i need to match atleast first two words so that it can blindly take it

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Vlookup first two words in the cell

    can you upload example workbook?

  5. #5
    Registered User
    Join Date
    09-11-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Vlookup first two words in the cell

    SLX-test.xlsxSLX-test.xlsx


    please check the automated sheet

    i took the reference from SLX sheet, now i need to match the account name by first two words ...

    please help me out

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Vlookup first two words in the cell

    So you will write Adare On and you want to search for Adare On Demand Communications Ltd (for one criteria)?

  7. #7
    Registered User
    Join Date
    09-11-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Vlookup first two words in the cell

    may be yes

    example: adarsh, there are many accounts on the name adarsh, so what i want is to match adarsh "second word" should be considered automatically while searching, which means if i give adarsh developers ltd it should search for adarsh developers and give the matching result

  8. #8
    Forum Contributor
    Join Date
    08-23-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Vlookup first two words in the cell

    Hi...I think zbor has given the right formula. You just need to change referances.

    =VLOOKUP(TRIM(LEFT(SUBSTITUTE(C4," ",REPT(" ",255),2),255)), SLX!B:D, 3, FALSE)

  9. #9
    Registered User
    Join Date
    09-11-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Vlookup first two words in the cell

    no its not working

    and moreover i need this reference in array which i have used, as i need to match two cells with two columns in the other sheeet which is not possible through vlookup, so plz help how to search with the given array
    i have used wild cards but still we cant match first two words ...s o please help me

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Vlookup first two words in the cell

    I've put here with your result also another approach.
    Looks they both return same result.
    Can you check solutions and tell us if some of them need to return another answer?
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    09-11-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Vlookup first two words in the cell

    actually all the accounts are existing in slx sheet. but we missed out some accounts and are displayed as #N/A ... so i need a forumla where i get 100 % result

    thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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