+ Reply to Thread
Results 1 to 8 of 8

how to write a lookup function without a "lookup vector" column

  1. #1
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    how to write a lookup function without a "lookup vector" column

    Some time ago I saw a way to write a lookup function without using a designated column for the "lookup vector". The person was somehow using row numbers to create a virtual lookup vector without needing a special column filled with values for it. Something like this: =lookup(12,$A:$A,C1:C20). Could someone remind me how to do this? Thanks.
    Last edited by luv2glyd; 06-30-2015 at 02:25 PM.
    You either quit or become really good at it. There are no other choices.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: how to write a lookup function without a "lookup vector" column

    What you have will return the value in C corresponding to the same row in A that contains 12....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: how to write a lookup function without a "lookup vector" column

    Hi Glenn,

    What I am trying to do is not have any values in column A - perhaps I posted a bad example. The way that I saw this being done is the lookup "vector" did not actually exist in excel. The person had an entry in the portion of the function that used row numbers, not values entered into cells.

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

    Re: how to write a lookup function without a "lookup vector" column

    Sounds like you are looking for

    =LOOKUP(12,$A:$A,ROW(A:A))

    which returns the same as
    =MATCH(12,$A:$A,0)
    Is that it? If not, upload an example spreadsheet (Go Advanced>Manage Attachments) with an example or 2
    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

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: how to write a lookup function without a "lookup vector" column

    =lookup(12,$A:$C)
    This would give the same result as
    =lookup(12,$A:$A,C1:C20)

  6. #6
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: how to write a lookup function without a "lookup vector" column

    Ok, thank you both. Chemist, I repositioned the interior of yours and looks like it works:

    =LOOKUP(12,ROW(A:A),$C1:$C20)

    this does not require me to create a lookup vector. So if I want to get the 12th value of "result vector" (in cells C1 through C20), it gives it to me without having to have column A, for example, filled with values 1 through 20 that act as a "lookup vector".

    Thanks!

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: how to write a lookup function without a "lookup vector" column

    Try

    =INDEX($C1:$C20,12)

  8. #8
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: how to write a lookup function without a "lookup vector" column

    Hey Junmo - I only just now saw your reply. That's the easiest one by far - thanks!

+ 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. String an "IF" and "LOOKUP" (H or V) function together.
    By khughes46 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-27-2014, 04:53 PM
  2. can i write a function based on a "lookup" value in a closed workbook??
    By Ahkle in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-08-2013, 10:53 AM
  3. [SOLVED] Dynamic Range For "SMALL" Function Then Offset LookUp
    By david.nicholls in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-08-2013, 07:15 AM
  4. lookup date in column, search columns to right for name, return "x"
    By roothog in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-22-2012, 03:27 AM
  5. Replies: 0
    Last Post: 06-21-2006, 03:45 AM

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