Closed Thread
Results 1 to 9 of 9

LOOKUP in a range and return 4th column

  1. #1
    Registered User
    Join Date
    09-28-2008
    Location
    Katy, TX
    Posts
    59

    LOOKUP in a range and return 4th column

    I have a value that I need to look up in Named Range!

    For example if the named Range is "Test" and the first field is an ID field and I have the Value of "01".

    How would I do lookup and return the value in the 4th column of the named range?

    g

    Actually, I didn't think of this before, but I'm actually want to LOOKUP and change the value in Column 4. Can this be combined into 1 line of code?
    Last edited by Patchworks; 07-15-2009 at 01:36 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: LOOKUP in a range and return 4th column

    =Vlookup(X1,Test,4,False)

    where X1 contains the value to look up in the first column of Test.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: LOOKUP in a range and return 4th column

    Assuming you are using the VLOOKUP function:

    the third argument specifies which column to look in, thus

    vlookup(MyCell,MyDynamicRange,4,False)

    If you're using another look up method, such as INDEX/MATCH, let us know because the explanation is different.

  4. #4
    Registered User
    Join Date
    09-28-2008
    Location
    Katy, TX
    Posts
    59

    Re: LOOKUP in a range and return 4th column

    Thanks guys!! That helped alot!

    Can one of you provide me with an example of how to update the 4th column in that row where the lookup is found?

    g

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: LOOKUP in a range and return 4th column

    Not sure what you mean?

  6. #6
    Registered User
    Join Date
    09-28-2008
    Location
    Katy, TX
    Posts
    59

    Re: LOOKUP in a range and return 4th column

    Quote Originally Posted by NBVC View Post
    Not sure what you mean?
    Basically, I want to look up a value which is in the first column of a range and update a value in the 4th column of that row!

    Does that make sense?

    g

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: LOOKUP in a range and return 4th column

    Maybe it is just me, but I am still a bit confused... I think you may need VBA for what you want... if that is you want to be able to instead of returning a value from the 4th column given a match in the 1st column, you want to actually input a value in that 4th column where there is a match in column 1?

    Maybe posting a sample workbook with your request might help shed brighter light.

  8. #8
    Registered User
    Join Date
    09-28-2008
    Location
    Katy, TX
    Posts
    59

    Re: LOOKUP in a range and return 4th column

    Quote Originally Posted by NBVC View Post
    Maybe it is just me, but I am still a bit confused... I think you may need VBA for what you want... if that is you want to be able to instead of returning a value from the 4th column given a match in the 1st column, you want to actually input a value in that 4th column where there is a match in column 1?
    Yes, this is exactly what I need... This if for a user form that is saving data to a range. Once I save the data, I need to do a VBA lookup in another range based on an ID field and update a column in that row!

    g

  9. #9
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: LOOKUP in a range and return 4th column

    Patch, please don't post the same questions in multiple Excel forums without linking to each. This is considered cross posting and, frankly, annoys the heck out of many people.

    Link to cross post: http://www.mrexcel.com/forum/showthread.php?t=402921

    Future posts may be locked for cross-posting without links.

Closed 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