+ Reply to Thread
Results 1 to 6 of 6

Form with LOOKUP

  1. #1
    Forum Contributor
    Join Date
    05-19-2009
    Location
    Santiago, Chile
    MS-Off Ver
    Excel 2019
    Posts
    212

    Form with LOOKUP

    Let me start to say that I understand the Lookup formula though I have the following issue: let say I have (I hope I use this code correctly)
    Please Login or Register  to view this content.
    Now I want to create a form where I type for bananas and result should be on first line the green bananas and second line yellow bananas. So, how can I create a Lookup formula where it takes the second line and not again the first line

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

    Re: Form with LOOKUP

    Say your list starts in Sheet1!A2 and you enter "Bananas" in Sheet2, A1

    in Sheet1!D2 (next available column) enter:

    =Countif(A$1:A1,A1) and copy down

    in E2: =Max(D:D)

    Then in Sheet2!A2,

    =IF(ROWS($A$1:$A1)>Sheet1!$E$2,"",INDEX(Sheet1!B:B,MATCH(ROWS($A$1:$A1),Sheet1!$D:$D,0)))

    copy it down.. and if you want to next column to get the numbers too.
    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 Contributor
    Join Date
    05-19-2009
    Location
    Santiago, Chile
    MS-Off Ver
    Excel 2019
    Posts
    212

    Re: Form with LOOKUP

    When I type in Sheet2 A1 Oranges nothing is changing. When I leave it blank also nothing is changing. I keep to have in Sheet2 B always the color of bananas.

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

    Re: Form with LOOKUP

    Sorry, my Countif Formula should have been referring to Sheet2!$A$1

    =COUNTIF(A$1:A1,Sheet2!$A$1)

    see attached..
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-19-2009
    Location
    Santiago, Chile
    MS-Off Ver
    Excel 2019
    Posts
    212

    Re: Form with LOOKUP

    Thanks but it leads me to another question. I need the data for different forms so in the below case I will need it for Sheet2 but as well for Sheet3 and 4. How can I add different criterias in COUNTIF?

  6. #6
    Forum Contributor
    Join Date
    05-19-2009
    Location
    Santiago, Chile
    MS-Off Ver
    Excel 2019
    Posts
    212

    Re: Form with LOOKUP

    Dear Forum Administrator,
    This thread is solved though it doesn't give me the option to mark SOLVED. Can you maybe make this SOLVED?

+ 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