+ Reply to Thread
Results 1 to 10 of 10

Conditional Formatting on Cells with data validation

  1. #1
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Conditional Formatting on Cells with data validation

    I have column of cells, both of with have drop down menus to select information from. I have an adjacent cell to display an error based on conditions. Is there a way to have conditional formatting to apply to the cells with Data Validation to change the color, based on the error. I have tried using the Conditional Formatting options but it still does not change the color of them. I believe i have to use the formula option, but not exactly sure what to put, i know a if statement could work but unsure on how, there are only two conditions that i would need for it to apply, if the adjacent cell has an error, and when it does not. Is this possible?
    Last edited by paxile2k; 07-27-2009 at 07:19 PM. Reason: not resolved

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Conditional Formatting on Cells with data validation

    Care to tell us what constitutes an error?
    More likely than not, a CF formula can be developed, but we need to know more about what is an "error" in your worksheet.

  3. #3
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Conditional Formatting on Cells with data validation

    Thankyou for your response,
    The error display in the cell is text that i have specifed "Please choose a valid date", the colums prior are drop downs for month and date, based on the error, i would like those cells to turn red with white writing, if there is no error, the cells to turn green with black wrigting. I am unsure if it is possible with cells that have list values.

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Conditional Formatting on Cells with data validation

    Any formula used in Conditional Formatting must evaluation to either TRUE or FALSE.
    Simple example:
    Invalid formula =A1+B1
    Valid formula: =(A1+B1)>1

    Unless your error cells are numeric, then you would need to use the Formula is option for CF.

    Not knowing your cell references here is the idea:

    CF Formula 1: =A1="Please choose a valid date"
    Cf Formula 2: =and(not(isblank(A1)),A1<>"Please choose a valid date")

    The second formula uses the AND function to test two conditions, both which must resolve to TRUE for the conditional format apply.
    1 - A1 is not blank ( a selection was made)
    2 - The selection is not the error

    HTH,

    Palmetto

  5. #5
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Conditional Formatting on Cells with data validation

    That worked, thankyou Is there a way to have that same set of condition formatting to apply to multiple rows or would it have to be done individually?

  6. #6
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Conditional Formatting on Cells with data validation

    To apply the CF to other rows in the same column make the "CF" cell the active cell then fill down as needed.

  7. #7
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Thumbs up Re: Conditional Formatting on Cells with data validation

    Thankyou again for your response,
    It did not work for the fill option, it kept referencing the original "A1" cell. I can do it individually tho. Thankyou again for your assistance.

  8. #8
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Conditional Formatting on Cells with data validation

    There should be no problem with filling down as the formula use relative (A1) cell references. Did you change them to absolute ($A$1).

  9. #9
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Conditional Formatting on Cells with data validation

    Thankyou again for your response,
    No, i would like to go down in order. I changed them to reference a cell that is indicates a 1 for when conditions are not met, and 0 if conditions are met, then using that column to change the conditional formatting, ie 1=red w/ white writing, 0=green w/ black writing. When i select the cells with the formatting, B1:D1, then copy down to B15:D15 and it formats it incorrectly. and just formats based on what the resulting formatting has done. If it is red then all cells are red, if green all cells are green. Any way around this? or would it have to be done row by row individually?
    Last edited by paxile2k; 07-27-2009 at 12:46 PM. Reason: Added Text to issue

  10. #10
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Conditional Formatting on Cells with data validation

    Solved it, had to apply conditional formatting to each row, as it would not copy down based on cell values.

+ 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