+ Reply to Thread
Results 1 to 6 of 6

Thread: Special lookup formula

  1. #1
    Registered User
    Join Date
    07-15-2010
    Location
    mexico
    MS-Off Ver
    Excel 2007
    Posts
    10

    Unhappy Special lookup formula

    Hello,

    I'm having a little bit of problem trying to figure out how to do this formula for filtering. What I need is that if a line has a certain number at the end, then to get the next line that has another number. For example:

    Only the lines that start with the letter A, at the end, have a code, the first line in this example has a code 0395 from the extension 6193, I need a formula to get me the whole next line that has that extension 6193 which will be the fifth line in this example and add to the end of the line the code 0395

    EXT CODE
    A 103 00 6193 T010 070 07/27 09:53 0395

    A 104 00 6174 T010 069 07/27 09:54 0533

    N 105 00 6109 T010 068 07/27 09:55 00:00:04 A 96018005043599

    N 106 00 6174 T010 069 07/27 09:55 00:01:16 A 96015554477000

    N 107 00 6193 T010 070 07/27 09:54 00:02:26 A 960443221359157

    N 108 00 6507 T010 070 07/27 09:57 00:00:14 A 962254352

    A 109 00 6548 T010 070 07/27 09:57 0382

    N 110 00 T010 013 6512 07/27 09:58 00:00:26 C 3111032885

    N 111 00 6415 T010 069 07/27 09:55 00:02:32 A 962971475

    S 112 00 T010 015 6305 07/27 09:58 00:00:12 C 5555206258

    N 113 00 6548 T010 070 07/27 09:57 00:02:02 A 962810397

    Any ideas will be really apreciated.

    Thanks.

    George
    Attached Files Attached Files
    Last edited by bijan999; 07-27-2011 at 03:02 PM. Reason: Adding a file

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,222

    Re: Especial lookup formula

    Please post a sample workbook with some typical data and an explanation of what you have to start with and what you want to end up with

  3. #3
    Registered User
    Join Date
    07-15-2010
    Location
    mexico
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Especial lookup formula

    Ok, thanks. Just did that. Regards.

  4. #4
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,222

    Re: Especial lookup formula

    Try this in cell L2 and copy down:

    =IF(A2="A","",IF(INT(VLOOKUP(D2,D:J,5,FALSE))=0,"",TEXT(INT(VLOOKUP(D2,D:J,5,FALSE)),"0000")))

    See the example attached.


    Regards
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-15-2010
    Location
    mexico
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Especial lookup formula

    Tm,

    Thanks a lot. It works like a charm. I did't know you can hook up 2 vlookup in a row. Thanks again. Great job.

  6. #6
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,222

    Re: Special lookup formula

    You're welcome. Thanks for the rep.

    Regards

+ 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.2.0