+ Reply to Thread
Results 1 to 7 of 7

Changing an empty cell's background color depending on a different cell value.

  1. #1
    Registered User
    Join Date
    08-07-2014
    Location
    Alvin, TX
    MS-Off Ver
    2013
    Posts
    3

    Changing an empty cell's background color depending on a different cell value.

    Hi there!

    I'm trying to create a tag with a color border. What I desire is to fill the BLANK cells around the tag, A1:D1 + D1:D19 + A1:D19 + A1:19 in a certain color based on the text value of the cell B11. There are 5 different values, such that if the B11 read Red Sox - the boarder is going to be red, if it reads Houston Astros it will be dark blue, etc..

    I have a similar problem with changing the color of the cell based on the month. So regardless of the year, 2014, 2015, 2016, etc... If I use MONTH() function I can just get numbers from 1-12. I want Cell C16-C18 to be certain color depending the date entered in cell C17 such that for each quarter, months 1-3, 4-6, 7-9, 10-12 they are different color.

    I have had no luck with conditional formatting (and I also believe that it is good up to 3 cases only). I am decent in logic/programming language but have little knowledge with macro notation and especially how to run them in excel 2013. I do know how to start it alt+F11 and that I need to make sure that code is written under the specific sheet where my tag is located.

    Any help will be greatly appreciated. And thanks for your time in advance! I am hoping to learn this so next time I can change the code myself regardless of the different case requirement.

  2. #2
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Changing an empty cell's background color depending on a different cell value.

    sounds to me like conditional formatting should do the trick...

    you'll need to create a different rule for each team you might put in B11 (5 rules in total) the formula is simply:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and it applies to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    same story with the months, but the formula will be something like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    let me know if you have questions and / or upload a sample file and i'll just do it for you.

  3. #3
    Registered User
    Join Date
    08-07-2014
    Location
    Alvin, TX
    MS-Off Ver
    2013
    Posts
    3

    Re: Changing an empty cell's background color depending on a different cell value.

    Hi Simarui, thank you for your prompt reply! I actually got the border to finally work - so happy about it... However, I cannot get the cell fill to change based on the date. I believe there is something wrong with the formatting two conditions under one umbrella: month()>3 + month()<=6 . The color doesn't change when you input a new date...

    Can you please look at my sample formatting and see if you can catch the mistake? Thanks in advance.
    Attached Files Attached Files
    Last edited by Excell4Dummies; 08-07-2014 at 03:02 PM.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Changing an empty cell's background color depending on a different cell value.

    The attached has some of the Conditional Formatting that you want. Adjust to suit your requirements and add the others following the examples for the ones given.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Changing an empty cell's background color depending on a different cell value.

    i'm sure newdoverman's file works (didn't d/l it...) but i've also fixed the one you uploaded...

    gotta use and() to have two conditions, and instead of + use a comma.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-07-2014
    Location
    Alvin, TX
    MS-Off Ver
    2013
    Posts
    3

    Re: Changing an empty cell's background color depending on a different cell value.

    Thank you to both of you for all your help! Glad I learned something new today .

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Changing an empty cell's background color depending on a different cell value.

    You're welcome.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] changing background color in a single cell depending on text shown.
    By cause in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-04-2013, 03:00 PM
  2. Changing background colour transparency depending on cell value
    By wopoq in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2010, 08:39 PM
  3. Add a background color to a cell depending on what you write
    By ady_alternative in forum Excel General
    Replies: 2
    Last Post: 02-17-2010, 09:04 AM
  4. Changing cell background color automatically
    By PCMagician in forum Excel General
    Replies: 4
    Last Post: 03-11-2008, 12:58 PM
  5. Change cell background color depending on cell value
    By fredrock80 in forum Excel General
    Replies: 1
    Last Post: 03-14-2005, 03:22 PM

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