+ Reply to Thread
Results 1 to 2 of 2

Lookup part of textstring in Userform ComboBox and search for value in sheet range

Hybrid View

  1. #1
    Registered User
    Join Date
    03-16-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    3

    Lookup part of textstring in Userform ComboBox and search for value in sheet range

    Hi guys,

    I have a worksheet with following values:
    A B C
    1 Shorts 75
    2 Pants 25
    3 Socks 34
    4 Shirt 10



    Also I have a Userform with 2 ComboBoxes named "ComboBox1" and "ComboBox2". Values in ComboBox1 is "Pull my pants", "Eat my shorts", "Socks for everyone".

    What I would like to do is to search though column A and look for any of these textstrings in my selection in ComboBox1 and return the value from column B in column C.

    Example: "Pull my pants" is selected in ComboBox1 then the value "pants" should be found in column A and value in column B (25) should be entered in cell C2.

    Does this make sense?

    I am fairly new to VBA and have spend hours searching Google and found some formulas like InStr and VLookup. My problem is that I am not sure if these statements will do the job and how to combine them.

    Any help and guidance is appreciated.

    Thanks in advance

    Brgds
    Michael

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Lookup part of textstring in Userform ComboBox and search for value in sheet range

    Two questions from my end:-

    Why you need to return col-b value to col-c? Is it cut paste method or copy paste?

    What is the use of combobox2?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ 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. using userform textbox to search instead of combobox
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-01-2013, 02:06 PM
  2. [SOLVED] VBA code to search using userform with multiple combobox's
    By goffa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2013, 07:43 AM
  3. [SOLVED] Combobox find part matches from defined range (POWER FUZZY SEARCH)
    By hutzdani in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2013, 05:31 AM
  4. Userform & ComboBox to search a Workbook
    By StevenM in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2012, 03:01 AM
  5. Advanced Search and Lookup Part 2
    By hscmsf in forum Excel General
    Replies: 6
    Last Post: 02-08-2012, 02:54 PM

Tags for this Thread

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