+ Reply to Thread
Results 1 to 13 of 13

Vlookup with two right functions

  1. #1
    Registered User
    Join Date
    03-29-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2016
    Posts
    8

    Question Vlookup with two right functions

    Hi all, I'm a little stuck with a problem.

    I am trying to reference the last 5 characters (numerical) from a range of cells (L2:L5) in worksheet "Report", and then using vlookup i want to look in worksheet "Data". In "Data" I want to lookup the last 5 characters from the column range $A$2:$A$5 and give the result from column C in "Data" back into worksheet "Report".

    =VLOOKUP(ISNA(RIGHT(L2,5),'[Data.xlsx]Data'!$A$5:$C$5,3,FALSE),"No Match",L2)

    I have tried this formula, but I know it isn't quite there, and I haven't been able to figure out the correct way to use the right function twice. I am fairly new to excel btw, so I'm probably trying to run before I can walk lol!

    I would also like to report "No match" if there is no matching criteria, which I believe involves ISNA.

    Thanks in advance :-)
    Last edited by Jeppers; 03-29-2017 at 08:42 AM.

  2. #2
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Re: Vlookup with two right functions

    Jeppers,

    try this. updated

    =IF(ISNA(VLOOKUP("*"&RIGHT(L2,5),'[Data.xlsx]Data'$A$5:$C$5,3,0)),"No Match",VLOOKUP("*"&RIGHT(L2,5),'[Data.xlsx]Data'$A$5:$C$5,3,0))
    Last edited by Manikandan Arumugam; 03-29-2017 at 08:34 AM.
    Manikandan Arumugam
    Excel Learner

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Vlookup with two right functions

    try IFNA()

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Vlookup with two right functions

    Check the range of DATA tab. It is using a single row for the vlookup.

    and also what is L1 doing there.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Registered User
    Join Date
    03-29-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2016
    Posts
    8

    Re: Vlookup with two right functions

    Thanks Vladimir, typo, now edited!

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Vlookup with two right functions

    Basic pattern for VLOOKUP() is: VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])

    You can use IFNA() : IFNA(VLOOKUP(...),"type here whatever you want")

    but: IFNA function : Applies To: Excel for Android phones Excel Mobile Excel 2016 Excel 2013 Excel 2016 for Mac Excel for Mac 2011 Excel Online Excel for iPad Excel for iPhone Excel for Android tablets

    Also you can use IFERROR() : IFERROR(VLOOKUP(...),"type here whatever you want")

    IFERROR function : Applies To: Excel for Android phones Excel Mobile Excel Starter Excel 2016 Excel 2013 Excel 2010 Excel 2007 Excel 2016 for Mac Excel for Mac 2011 Excel Online Excel for iPad Excel Web App Excel for iPhone Excel for Android tablets

  7. #7
    Registered User
    Join Date
    03-29-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2016
    Posts
    8

    Re: Vlookup with two right functions

    Ok so here's a simplified example. I'm trying to report the email address next to Order number
    [IMG]Dataexample.png[IMG]
    [IMG]Reportexample.png[IMG]
    Attached Images Attached Images

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Vlookup with two right functions

    What i mean is you have vlookup wherein you will return the value from column 3, right?
    then if you cannot find any match for your vlookup it will return "No Match"
    so what will be the use of returning the value of L2, on what instances?

    self withdraw this part....
    Last edited by vlady; 03-29-2017 at 09:05 AM.

  9. #9
    Registered User
    Join Date
    03-29-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2016
    Posts
    8

    Re: Vlookup with two right functions

    Thanks vlady, I do want to return the value from column 3. I don't need to return the value of L2, you're correct. As I said, I'm a newbie to formulas! In my above example, I want to read just the last 5 numbers from column A (EXAMPLE12343) and compare them to column A in the other spreadsheet (SALE12343) and return the value [email protected]

  10. #10
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Vlookup with two right functions

    Follow post #6 for the other guides

    VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])

    lookup_value --this is the formula-> right(L2,5)
    table_array, col_index_num -- this is hte range on where the lookup will search the WHOLE DATA -> A2:C4
    [range_lookup] - this is tyhe column number where you want to pull the value so column C which is -> 3

    =VLOOKUP("*"&RIGHT(L2,5),'[Data.xlsx]Data'$A$2:$C$4,3,0))

    now in case of error you can use iferror as stated in post #6

    IFERROR(VLOOKUP(...),"type here whatever you want") --->>>you can use this for error handling

    iferror(VLOOKUP("*"&RIGHT(L2,5),'[Data.xlsx]Data'$A$2:$C$4,3,0)),"NO MATCH")

  11. #11
    Registered User
    Join Date
    03-29-2017
    Location
    Portsmouth, England
    MS-Off Ver
    2016
    Posts
    8

    Re: Vlookup with two right functions

    Yes, yes, yes, you brilliant bloke! That's done the trick, thanks very much! :-) :-) :-)

  12. #12
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Vlookup with two right functions

    You are very much welcome from all of us.
    You can mark this thread "SOLVED"

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.


    Regards,
    Vlady

  13. #13
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Vlookup with two right functions

    You are very much welcome from all of us.
    You can mark this thread "SOLVED"

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.


    Regards,
    Vlady

+ 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. VLOOKUP and IF functions or COUNTIF and AND functions?
    By MHayward in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2015, 11:11 AM
  2. [SOLVED] VLOOKUP and RIGHT functions
    By Darko42 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-01-2014, 03:49 PM
  3. Nesting Vlookup Functions with IF Functions and possibly more
    By Anitarizzo in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 03-27-2014, 12:50 AM
  4. Vlookup and & Functions
    By lsm33000 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 02-11-2014, 03:50 PM
  5. Multiple IF Functions or VLOOKUP functions
    By yinka00000 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-15-2012, 11:29 PM
  6. vlookup functions within if functions.
    By sjhill60 in forum Excel General
    Replies: 1
    Last Post: 10-13-2011, 11:10 PM
  7. VLOOKUP and MAX/MIN functions
    By CGFC92 in forum Excel General
    Replies: 3
    Last Post: 02-12-2010, 05:12 PM

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