Closed Thread
Results 1 to 4 of 4

How to hide cells if the conditional formatting in column A has made them Green

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    How to hide cells if the conditional formatting in column A has made them Green

    I have a spreadsheet that equals another cell in a different worksheet. The cell that it is referencing is a result of a formula from two other cells. I have 57 cells from a38:a95 that if they equal 0 and I have them conditionally formatted to turn green, but I need to hide the entire row of them. If anything changes in the spreadsheet, say it would happen to turn to yellow because it now equals 1 then I would need it to not be hidden. TIA!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to hide cells if the conditional formatting in column A has made them Green

    You can't use VBA to test for the color of a cell that is controlled by conditional formatting. If CF turned it green, the cell still doesn't register as "green" when tested. But cycling through colors would be the wrong way to do it anyway.

    You already have the answer:
    if they equal 0 and I have them conditionally formatted to turn green
    So there's your test... you can use cycle through the rows and hide the ones that equal 0 in that particular column.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: How to hide cells if the conditional formatting in column A has made them Green

    So I can't create a code if the cell equals 0. How do I write that code. I am very new to codes and it is very confusing to me. Thanks!

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

    Re: How to hide cells if the conditional formatting in column A has made them Green

    Quote Originally Posted by Triscia View Post
    So I can't create a code if the cell equals 0. How do I write that code. I am very new to codes and it is very confusing to me. Thanks!
    Your question has already been answered here - http://www.excelforum.com/excel-prog...-not-used.html so marking this thread as closed.
    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]

Closed 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