Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Format (XL97:SR2)

    I have a number of cells that have a conditional format. My goal is to have code look at the colorindex of the cell and hide the row, test the next cell below and loop until an empty cell is reached. The issue is that I can not get/return the colorindex of a cell that has a conditional format on it.

    Example:
    Cell C4 = 1 Cell C5 has the conditional format


    The colorindex should return 36 but does not. I tried doing a test on "Range("C5").FormatConditions(1).Interior.ColorInd ex = 36" and had no luck.

    Any assistance would be appreciated.
    Thanks,
    John

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Conditional Format (XL97:SR2)

    The FORMAT of the cell does NOT change when the conditional formatting changes. You have to determine WHICH (if any) of the conditions are active and then determine the colorindex of the that condition!

    Check out Chip Pearson's explanation.
    http://www.cpearson.com/excel/CFColors.htm

    Chip has all the functions above. It is NOT a simple "check the cell format"

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •