+ Reply to Thread
Results 1 to 4 of 4

Answer a function with a string

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    Answer a function with a string

    Just out of interest, why does this not work? Is there a way for it to work?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,441

    Re: Answer a function with a string

    try
    Please Login or Register  to view this content.
    This assumes answer either contains TRUE or FALSE
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    01-29-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Answer a function with a string

    Quote Originally Posted by Andy Pope View Post
    try
    Please Login or Register  to view this content.
    This assumes answer either contains TRUE or FALSE
    Thank you! This is going to help me with something much bigger, just this as a basic example.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Answer a function with a string

    CBool("cat") returns a type mismatch error.
    A test that would never error would be
    Please Login or Register  to view this content.
    or, since a Worksheet's Visible property isn't Boolean,

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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. [SOLVED] Getting Type Mismatch with String passed to a Function with String parameter
    By allansy8 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2014, 10:33 PM
  2. Replies: 0
    Last Post: 05-29-2014, 09:38 AM
  3. How can I freeze the answer to a function?
    By HomerDPoe in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 03-05-2012, 03:52 PM
  4. Function not getting the correct answer
    By baseball9 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-18-2008, 10:17 AM
  5. Replies: 0
    Last Post: 02-21-2006, 12:10 PM
  6. Answer in Red in =IF function
    By Tenacity in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2005, 06:06 AM
  7. [SOLVED] Sum Function sometimes displays incorrect answer
    By John Westgate in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-18-2005, 09:06 AM

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