Find Values In List

  • I Want To Add A Function To A Worksheet That Allows A User To Type A Word And It To Return Matches And Their Corresponding Number In A Different Column. For Example If A User Types In "new" In Cell A1 I Would Like For The Sheet To Return "new Deal" "1"; "new Order" "2"; "new Meal" "3"; And So One Until All Values Of "new" Are Returned. I Would Like These To Be Reutrned In A Pop Up Window If Possible.


    I Know This Might Be Tricky But This Forum Is Great -


    Thanks In Advance!

  • Re: Find Values In List


    Hi Zotee


    with a selection change event, this becomes:



    Cheers


    Wigi


    EDIT


    PS: can you please change the capital at each new word... Doesn't read easily I find.

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

  • Re: Find Values In List


    Sorry about the caps thing. I type everything in all caps and when it is posted to changes to first letter caps -


    Your post works excellent. The only thing is that can it be adapted to return information in column B:B and column C:C so if B2 = "new gear" and E2 = "1234472" it will return this instead of the row it is located on.


    The code works great though. Thanks for your help.

  • Re: Find Values In List


    Quote from zotee98

    Sorry about the caps thing. I type everything in all caps and when it is posted to changes to first letter caps


    Oh man... that's just askin for trouble... On any message board.


    You're better off all LC if you must.

    [SIZE="1"]Sub All_Macros(Optional control As Variant)[/SIZE]

  • Re: Find Values In List


    Like this?


    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

  • Re: Find Values In List


    i cant get this to run correctly. i am try to reference cell G1 on the "INPUT SHT" and this code is pasted on the "items" sheet. nothing happens when i put something in cell "G1" on the sht 1.


  • Re: Find Values In List


    also - is there a better way to line up the data in the returned message box. i have a great deal of tab's and they still dont line up correctly. please help.

  • Re: Find Values In List


    Does this work?


    You need to put the code in the sheet "Input sheet" (or whatever). Not in an ordinary module or elsewhere.



    About the alignment: you shouldn't do that in a message box, of course. What about placing the results in some columns you choose on beforehand?

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

  • Re: Find Values In List


    wow i keep coming up with these little questions - how does excel determine how many results to return. it seems to be very random and the msg box size is not always the same. it seems to max out at 23 returns.

  • Re: Find Values In List


    Quote from zotee98

    it seems to be very random and the msg box size is not always the same. it seems to max out at 23 returns.


    Yet another reason to abandon the use of the message box.



    Is this what you want?


    Wigi

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!