+ Reply to Thread
Results 1 to 8 of 8

Conditionally lookup part of small list.

  1. #1
    Registered User
    Join Date
    11-13-2009
    Location
    Espaņa
    MS-Off Ver
    Excel 2003
    Posts
    95

    Conditionally lookup part of small list.

    Hi all,

    CONDITIONAL LOOKUP

    In Sheet1 I have:-

    a, a numeric cell in which I manually enter a number (between 4 & 20 (if relevant)).
    b, 20 text cells (single column list) of manually entered names.

    In Sheet2, I want to display the names from b, above according to the number entered in a, above

    e.g.:-
    Sheet1
    Cell A1 has, for example, '10' manually entered.
    Cells B1 thru B20 have 20 distinct names manually entered.
    Sheet2 needs to display the first 10 names (top down) from B1 - B20

    Can someone please tell me the correct formula/expression to use.

    Thanks,
    J.
    PS: Apologies to Cheeky Charlie for repeating the question. I didn't get a chance to explain my point of confusion in the previous thread.
    Last edited by Jo-Jo; 11-25-2009 at 10:00 PM. Reason: Marked Solved

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Conditionally lookup part of small list.

    Try this in B1 of Sheet2:
    Please Login or Register  to view this content.
    and drag down to B20
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Registered User
    Join Date
    11-13-2009
    Location
    Espaņa
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: Conditionally lookup part of small list.

    Hi rwgrietveld,

    Thanks for the reply.

    Quote Originally Posted by rwgrietveld View Post
    Try this in B1 of Sheet2:
    Please Login or Register  to view this content.
    and drag down to B20
    Can you tell me if there is a way I can change that expression so it can go in an arbitary cell in Sheet2?

    It does work as is, but (unless I'm doing something wrong) it has to be in B1, or at least within row1 to fully populate my list.

    Or is it me?

    Thanks,
    J.
    Last edited by Jo-Jo; 11-25-2009 at 10:55 AM. Reason: Corrected into Sheet2 where as was Sheet1.

  4. #4
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Conditionally lookup part of small list.

    Yes the Row() is killing you.

    Change it to where you start minus x so it starts from 1.

    e.g. you start in Q25 -> Row(Q25)-24

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Conditionally lookup part of small list.

    Or just point the first one at row 1:
    =IF(Row(1:1)<=Sheet1!$A$1,Sheet1!B1,"")

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Conditionally lookup part of small list.

    Or if you're pedantic like me, using the Q25 example

    =IF(ROWS(Q$25:Q25)<=Sheet1!$A$1,Sheet1!B1,"")

    The references in ROWS will adapt should you insert/remove rows above etc meaning the formula will itself adapt as a matter of course without need for intervention.

  7. #7
    Registered User
    Join Date
    11-13-2009
    Location
    Espaņa
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: Conditionally lookup part of small list.

    Very many thanks everyone,

    I won't mark this solved yet, I'm still having a little trouble with it, but I know it's me and I want to try to work out where exactly to kick myself... suggestions welcome!

    J.

  8. #8
    Registered User
    Join Date
    11-13-2009
    Location
    Espaņa
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: Conditionally lookup part of small list.

    Thank you again guy's,

    I've got it and marked solved

    J.

+ 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