+ Reply to Thread
Results 1 to 4 of 4

Filling adjacent cells with same fill color

  1. #1
    Registered User
    Join Date
    11-26-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Filling adjacent cells with same fill color

    I want to make it so that if cell A1 has a negative value in it, say -10, that cells A1 and B1 both have the same fill color (red). I want it to be done automatically as soon as the value is entered into A1. How do I do this. Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Filling adjacent cells with same fill color

    watido,

    Select Cells A1:B1, then click on Conditional Formatting (not sure exactly where it is in Excel 2007 - I think it's in the ribbon. Click New Rule, Use a formula to determine which cells to format, then type/copy:

    Please Login or Register  to view this content.
    Select your formatting, then Ok/Apply your way out, and you're done.
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Filling adjacent cells with same fill color

    You can use this code that will change the cells on leaving the cell A1

    Please Login or Register  to view this content.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  4. #4
    Registered User
    Join Date
    11-26-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Filling adjacent cells with same fill color

    thanks BB1972, that was a lot easier than I thought it would be.

+ 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