+ Reply to Thread
Results 1 to 3 of 3

Colouring cells based on a cell value

  1. #1
    Registered User
    Join Date
    10-09-2012
    Location
    Newark England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Post Colouring cells based on a cell value

    Hi,

    I am trying to change the colour of a row of cells based on the value in one of the cells as follows:

    On any row, columns A to R contain dates, numbers and texts and column H contains a percentage value. I want to colour cells A to R on that row when cell H on that row is set to 0% or 90%+

    I have the following sub which puts today's date in column B when any change is made to a series of cells on that row but I don't know how to test for a specific value rather than just any change. The last line of the sub does change the colour of column G when H is changed but as I say I want to change the colour of the row (A to R) on specific values.

    Please Login or Register  to view this content.
    I have done this using Conditional Formating on one row but I think I may have discovered a bug in Excel because when I copy the conditionally formatted cell to the next row it does not retain the range of cells I want to change the colour of, rather just the one cell as follows:

    Using conditional formatting i select the range of cells I want to change the colour of first, then enter a new formatting formula of =$H4 = 0% and when I enter 0% into H4 it applies the colour I select to the range I selected. However when I copy the formatted cell to the next row it only colours H4 not the range I selected, hence I think it's a bug.

    Any help appreciated.

    Regards,
    Geoff.


    Moderator Edit:

    Welcome to the forum, London257.

    Please notice that [CODE] tags have been added to your post. The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.
    Last edited by Cutter; 10-17-2012 at 03:43 PM. Reason: Added code tags

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Colouring cells based on a cell value

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-23-2012
    Location
    Israel
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Colouring cells based on a cell value

    Hi Geoff,

    If i got you correctly the number of the first row is 4.
    What is the number of last row you want to apply the conditional formatting on?

+ 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