+ Reply to Thread
Results 1 to 3 of 3

Formula always returns False instead of value, Why?

  1. #1
    Registered User
    Join Date
    01-05-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2016
    Posts
    17

    Formula always returns False instead of value, Why?

    Why does serialCell always return False? I would expect it to return the value of the cell in column L next to matched cell in column K

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by p1awn; 09-26-2017 at 01:06 AM. Reason: add file

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,436

    Re: Formula always returns False instead of value, Why?

    Why is it returning FALSE? Follow the logic you have:
    Please Login or Register  to view this content.
    1) It checks to see if serialCell is Empty. If it is, then
    2) let Serialcell (.value implied) become the value of the rest of this expression. This expression is a boolean expression that checks the Serialcell.formula string and compares to that text string in the statement. We already established that serialcell is empty, so serialcell.formula cannot be the same as that text string, so the result of the boolean expression is FALSE, so VBA assigns that value to the serialcell.Value property (and triggers a new calculate event).

    If you want to return the result of the lookup function, then you need to "translate" that Excel formula into VBA syntax. This is not the kind of programming I do, so I am not sure exactly what you need to do here. With the data validation in place, is it necessary to test if the lookup will fail? If not, this might be as simple as
    Please Login or Register  to view this content.
    If that doesn't work, the idea is still that you need to think through the logic you are trying to use with that formula string and translate that into a statement (or statements) that VBA can use to recreate that logic.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    01-05-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: Formula always returns False instead of value, Why?

    Thanks MrShorty.

    That was what I wanted to do. I tried different methods but not the worksheetfunction.
    Thanks for taking the time to explain it for me.

+ 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] Formula Returns False
    By Rain Quintero in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-02-2015, 02:48 AM
  2. [SOLVED] formula returns "false" on blank data
    By davemon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-18-2015, 03:07 PM
  3. [SOLVED] Getting #VALUE! error if formula returns false.
    By Jhail83 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-13-2013, 04:56 PM
  4. [SOLVED] Vlookup formula returns with False Result, How can I get the exact value ?
    By Midoya in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 02-21-2013, 04:34 AM
  5. Conditional format a cell when the formula returns False
    By eddienole in forum Excel General
    Replies: 1
    Last Post: 05-16-2012, 01:35 PM
  6. Replies: 2
    Last Post: 08-02-2006, 06:10 PM
  7. How to do nothing if @IF returns FALSE?
    By PMorrisDuke in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2006, 11:45 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