Results 1 to 12 of 12

Validating cells based on content and background color

Threaded View

  1. #3
    Registered User
    Join Date
    04-24-2015
    Location
    Seattle, WA
    MS-Off Ver
    2013
    Posts
    12

    Re: Validating cells based on content and background color

    Hi GeneralDisarray,

    Listed below is some code that changes the interior.colorindex to yellow based on a couple of conditions:

    If Target.Column = 95 Then
        
        If Target.Text = "Yes" And Target.Offset(, -1).Text = "Yes" Then 
          Application.EnableEvents = False
          range("CR" & ActiveCell.Row & ":CV" & ActiveCell.Row).Interior.ColorIndex = 6 'change background color to yellow
        Else
        End If
    End If
    Depending on the value of column 94 and 95, the interior.colorindex could be black, yellow or xlNone. If it's black or xlNone, entry shouldn't be required. Only if there is a yellow background.

    In your first suggestion, what would the named formula look like?

    Thanks, so much, for your help!
    Last edited by anthronewman; 08-04-2015 at 04:54 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to add cells just based on their color background?
    By meirelesj in forum Excel General
    Replies: 7
    Last Post: 07-28-2015, 07:04 AM
  2. Modify Cell Background Color based on cell content
    By CWDurkin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-01-2014, 11:57 AM
  3. Change cell background color based on another cells background color
    By Queo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 06-10-2014, 05:28 AM
  4. [SOLVED] Sum and average cells based on background color
    By Kaitlynn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-22-2013, 12:51 PM
  5. [SOLVED] Color Index to sum up cells based on background color
    By jph89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2013, 03:23 PM
  6. Replies: 3
    Last Post: 05-02-2012, 09:08 AM
  7. Count Cells Based On A Background Color
    By NSTurk725 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-27-2010, 11:29 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