+ Reply to Thread
Results 1 to 5 of 5

Check if an input in a userform is contained in a column of a target sheet

  1. #1
    Registered User
    Join Date
    12-14-2013
    Location
    edo,nigeria
    MS-Off Ver
    Excel 2007
    Posts
    85

    Check if an input in a userform is contained in a column of a target sheet

    I have a userform which I use to enter item names and their corresponding cost and selling prices. Now, to avoid duplication of items, I would want some macros which will check if an item in a text box( named drug) already exists. If it exists, let it display a message box telling the user that the item already exists.
    here is a little detail about the structure:

    1. text box is labelled ," Drug"
    2. They are stored in a sheet named, "database"
    3.The item names are contained in column A starting from the 3rd row

    In summary, I want to check if the input in text box named "Drug" is contained in column A of "database" sheet"
    Thanks.
    Chris.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Check if an input in a userform is contained in a column of a target sheet

    Hi Chris. Place this code in the code window for your userform.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Check if an input in a userform is contained in a column of a target sheet

    Hi Chris. Place this code in the code window for your userform.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-14-2013
    Location
    edo,nigeria
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: Check if an input in a userform is contained in a column of a target sheet

    Thanks . That was helpful .

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Check if an input in a userform is contained in a column of a target sheet

    My pleasure.

+ 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. how can you check if the data you input is already in your sheet..
    By kent101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2014, 11:49 PM
  2. [SOLVED] Check if any value from column A is contained in any value from column B
    By kevv in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-17-2013, 01:42 PM
  3. [SOLVED] Preparing text string based upon check box input in a userform
    By rreifs68 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2013, 12:31 AM
  4. [SOLVED] for each sheet with first 3 char matching variable, copy column C to Target sheet unless..
    By Spyderz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2012, 08:17 AM
  5. check is input textboxes is numeric on userform
    By Jean-Pierre D via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-16-2005, 04:05 PM

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