+ Reply to Thread
Results 1 to 8 of 8

Right Function combined with vlookup

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Right Function combined with vlookup

    I have a spreadsheet with 7 digit extensions numbers.

    For example.

    9838522
    9838699
    9838159
    9838325
    9838354

    I would like to use the right function combined with the vlookup to return all extension numbers beginning with 83

    Can somebody please advise on the correct formula i should be usinng?
    Attached Images Attached Images

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Right Function combined with vlookup

    Hi Technofob,

    Welcome to the forum.

    Basis your example, do you need :-

    838522
    838699
    838159
    838325
    838354

    Or do you need:-

    8325
    8354

    or

    None

    as all numbers begins with 9

    ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Right Function combined with vlookup

    If your data is in column A then try this formula in another column:

    =IF(ROW(1:1)>SUMPRODUCT(--(LEFT(A$1:A$1000,2)="83")),"",INDEX(A:A,LARGE(INDEX(ROW(A$1:A$1000)*(LEFT(A$1:A$1000,2)="83"),0),SUMPRODUCT(--(LEFT(A$1:A$1000,2)="83"))-(ROW(1:1)-1))))

    And drag down to fill in all of the numbers.

  4. #4
    Registered User
    Join Date
    03-13-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Right Function combined with vlookup

    Quote Originally Posted by dilipandey View Post
    Hi Technofob,

    Welcome to the forum.

    Basis your example, do you need :-

    838522
    838699
    838159
    838325
    838354

    Or do you need:-

    8325
    8354

    or

    None

    as all numbers begins with 9

    ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    I need 8325, 8354 etc

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Right Function combined with vlookup

    Hi Technofab,

    See the attachment and let me know if this is what you were looking forward, if not share your sample scenario(s). thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-13-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Right Function combined with vlookup

    This is exactly what i need. Many Thanks

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Right Function combined with vlookup

    You are welcome Technofob...

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Right Function combined with vlookup

    Andrew's formula modified for using MID instead of LEFT works and removes blanks

    =IF(ROW(1:1)>SUMPRODUCT(--(MID(A$1:A$1000,4,2)="83")),"",INDEX(MID(A:A,4,4),LARGE(INDEX(ROW(A$1:A$1000)*(MID(A$1:A$1000,4,2)="83"),0),SUMPRODUCT(--(MID(A$1:A$1000,4,2)="83"))-(ROW(1:1)-1))))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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