+ Reply to Thread
Results 1 to 7 of 7

data validated cell

  1. #1
    Forum Contributor KBSH's Avatar
    Join Date
    09-16-2015
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    113

    data validated cell

    Hello

    I've found something strange concerning data validated cells. In the attachment there's a workbook with row "1" (click on the first sheet....you can ignore the other sheet) containing cells with long formulas. One of those cells has data validation but has a red fill although it only contains a formula and no result. If the result of the formula would be higher then 41 it should mark the cell red and not at this moment.

    Does anyone know why the cell is colored red?
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by KBSH; 05-10-2016 at 04:42 PM.
    I'm mediocre with VBA, but getting there

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: data validated cell

    The issue is that you are looking at the null string "". Take any cell (say A1) and put ="" in it then evaluate =A1 > 41 and you will see that it evaluates to TRUE. It doesn't make intuitive sense, but that's Excel for you.

    So you have to use a formula for the conditional format =AND(H1>41,H1<>"").
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: data validated cell

    Quote Originally Posted by dflak View Post

    So you have to use a formula for the conditional format =AND(H1>41,H1<>"").
    Another way...

    =N(H1)>41
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: data validated cell

    What is this N formula? I've not seen it before.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: data validated cell

    From Excel help on the N(value) function...

    Data Range
    A
    B
    1
    If value is or refers to
    N returns
    2
    A number
    That number
    3
    A date, in one of the built-in date
    formats available in Microsoft Excel
    The serial number of that date
    4
    TRUE
    1
    5
    FALSE
    0
    6
    An error value, such as #DIV/0!
    The error value
    7
    Anything else
    0

  6. #6
    Forum Contributor KBSH's Avatar
    Join Date
    09-16-2015
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    113

    Re: data validated cell

    Thanks guys!

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: data validated cell

    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 the IF function in a data validated cell
    By cmckenna in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2016, 09:50 AM
  2. [SOLVED] Nested IF populating Data Validated Cell
    By TBD98 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-03-2016, 05:14 PM
  3. Multiple Selection from a data validated list in the same cell
    By JGDC2810 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2013, 07:13 AM
  4. [SOLVED] Macro that will run data-validated cell individually through the list it is based on
    By dks345 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2013, 07:46 PM
  5. Replies: 1
    Last Post: 08-16-2012, 02:48 PM
  6. Protecting a data validated cell
    By mycroft777 in forum Excel General
    Replies: 0
    Last Post: 12-05-2007, 10:13 AM
  7. Selecting a specific cell (that is data validated)
    By cliodne in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-23-2006, 02:55 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