+ Reply to Thread
Results 1 to 5 of 5

Get UDF to return True or False

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Get UDF to return True or False

    Hello everyone
    I have values in range("C5:G5") .. and I need to build UDF that searches specific value in this range but range C5:G5 is stored as an array



    Example:
    The values in range("C5:G5") are 13 / 22 / 33 / 34 / 47

    arrTemp=range("C5:G5").value

    The value to search is 34

    I imagine the following UDF
    SearchInAnArray(the value{34},arrTemp)

    The result in that case would be True as the value 34 existing the array arrTemp

    Thanks advanced for help
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Get UDF to return True or False

    Do you really need a UDF for that? You can do it with this formula:

    =ISNUMBER(MATCH(34,C5:G5,0))

    Hope this helps.

    Pete

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Get UDF to return True or False

    Perhaps:-
    Please Login or Register  to view this content.
    Regards Mick

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Get UDF to return True or False

    @Pete
    Thanks a lot but need UDF for another sub routine so formulas are not suitable (although it is easier here)
    @MickG
    Thank you very much for quick and perfect solution. Exactly as needed
    Best Regards

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Get UDF to return True or False

    You're welcome

+ 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 VLookUp to return True or False
    By bishoposiris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2014, 01:17 PM
  2. Return #VALUE! as True or False
    By BlastRanger in forum Excel General
    Replies: 3
    Last Post: 09-08-2010, 03:14 AM
  3. make OR() return 0 or 1 instead of true and false
    By boarders paradise in forum Excel General
    Replies: 16
    Last Post: 10-19-2009, 01:06 PM
  4. Replies: 3
    Last Post: 07-15-2006, 05:20 AM
  5. [SOLVED] Look up to return a true/false value
    By WTG in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-12-2006, 11:20 AM
  6. Function to return True/False if all are validated as True by ISNU
    By Tetsuya Oguma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2006, 06:30 AM
  7. [SOLVED] How do I return True False
    By SimonP in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-31-2006, 12:15 PM
  8. [SOLVED] Can LooKUP get return value of True or False?
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2005, 07:30 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