+ Reply to Thread
Results 1 to 4 of 4

Excel Macro : Function that will return true or false if a value exist in a column

  1. #1
    Registered User
    Join Date
    06-22-2011
    Location
    montreal, canada
    MS-Off Ver
    Excel 2010
    Posts
    16

    Excel Macro : Function that will return true or false if a value exist in a column

    Hi guys,

    I am finishing up a custom user form for an excel macro and was looking for a function you can send a value to it and it will return a true or false if the value exist in a specific column. (it needs to check all records on a specific column without specifying the length it has)

    Ex:

    Please Login or Register  to view this content.
    Tried a few function but they did not work properly. Any help would be much appreciated!


    Thanks!
    Last edited by student1976; 09-02-2011 at 09:25 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Excel Macro : Function that will return true or false if a value exist in a colum

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

  3. #3
    Registered User
    Join Date
    06-22-2011
    Location
    montreal, canada
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Excel Macro : Function that will return true or false if a value exist in a colum

    Quote Originally Posted by teylyn View Post
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Thanks, just fixed it!

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Excel Macro : Function that will return true or false if a value exist in a colum

    hi, student1976, you could use:

    Please Login or Register  to view this content.
    where:

    SearchValue - value you are searching for
    Column - sheet column to search for SearchValue

    If value exists, x will be row number the value is in, otherwise x will contain Error

+ 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