+ Reply to Thread
Results 1 to 5 of 5

Thread: Vlookup

  1. #1
    Registered User
    Join Date
    01-28-2010
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2003
    Posts
    3

    Vlookup

    Good afternoon,

    I have some data in Excel, if B1="FO/1", then I want it to return the value that is in C2. If B1 is not = "FO/1", then I need it to look in C2, check that number and see if that number has "FO/1" in B1. If not, keep checking until it finds it. Here's some sample data:

    OFC_CDE OFC_TYPE RPTS_TO AREA_CDE
    111 FO/1 H02 H02
    222 FO/2 111 ???
    333 FO/2 222 ???

    So, what this is saying, is that OFC_CODE 333 has an OFC_TYPE of FO/2. It reports to 222. 222 is also and OFC_TYPE of FO/2, it reports to 111. 111 is an OFC_TYPE FO/1, it reports to H02. Since 222 and 333 report to 111 and 222, respectively, I need the AREA_CDE for 222 and 333 to show H02.

    Can someone please help me???

  2. #2
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Vlookup??

    As long as your sheet is structured orderly like that, then perhaps this in D2, copied down:

    =IF(B2="FO/1",C2,D1)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-28-2010
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Vlookup??

    Quote Originally Posted by JBeaucaire View Post
    As long as your sheet is structured orderly like that, then perhaps this in D2, copied down:

    =IF(B2="FO/1",C2,D1)


    Life's not that good.:-(

  4. #4
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Vlookup

    Present a more complete example showing all the hurdles and variations to deal with.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    01-28-2010
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Vlookup

    Quote Originally Posted by JBeaucaire View Post
    Present a more complete example showing all the hurdles and variations to deal with.
    Okay, will do, thank you.

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