+ Reply to Thread
Results 1 to 9 of 9

Removing Colour From Empty Cells

  1. #1
    Registered User
    Join Date
    07-21-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    17

    Removing Colour From Empty Cells

    Hi,

    I have code that colours cells based on their values. But i'm using a loop and it's colouring blank cells within the loop.

    here is the code:
    Please Login or Register  to view this content.
    The last two statements are commented out at the moment (was my approach to remove the colour). Right now the code colors cells that are either 0 or empty cells up to row 750 with the colour I used to colour the cells with the value of 0.

    Beyond row 750 the cells are white again, not sure how to go about removing the colour of the empty cells before that. I also tried the IsNumeric() for my = 0 statement.

    Any help is greatly appreciated.

    Thanks,
    Jermal
    Last edited by jpowell; 07-29-2011 at 03:12 PM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Removing Colour From Empty Cells

    Hi Jermal, try
    Please Login or Register  to view this content.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Registered User
    Join Date
    07-21-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Removing Colour From Empty Cells

    Hi Mordred,

    Greatly appreciate the response. Not sure i'm explaining it properly. It didn't change anything. I still have the blank cells, example 575 to 750 with colour after trying your approach. Also I dont want to make a macro to strictly make cells 575 to 750 white. As the report I'm running could change and have more added to it. It was just assumed it will not go over 750. So somehow its still seeing these blank cells = 0 even after the blank conditional. Any other thoughts?

    Thanks,
    Jermal

  4. #4
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Removing Colour From Empty Cells

    I think you need to upload a mock copy of your workbook so that we can see your reference to example 575 to 750. The way it is now, I am just guessing.

  5. #5
    Registered User
    Join Date
    07-21-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Removing Colour From Empty Cells

    Hi,

    I've attached an example of what I'm working with. I had to removed information. But still the same result. I have another loop colouring the 0 value cells for the estimated hour column.

    Thanks,
    Jermal
    Attached Files Attached Files

  6. #6
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Removing Colour From Empty Cells

    Hi Jermal, sometimes baby steps are needed, hopefully we are a step in the right direction now. Compare the following code with yours and noticed the lines that I commented out
    Please Login or Register  to view this content.

  7. #7
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Removing Colour From Empty Cells

    Also, if you want the "Task Estimated Hours" and "% Completed" columns to have the same colors in their interiors, use
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    07-21-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Removing Colour From Empty Cells

    Works now, thank you very much!

    Jermal

  9. #9
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Removing Colour From Empty Cells

    You are welcome!

+ 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