+ Reply to Thread
Results 1 to 3 of 3

Reading a conditionally formatted cell

  1. #1
    Registered User
    Join Date
    11-25-2005
    Posts
    19

    Reading a conditionally formatted cell

    I've tried to find if this has been handled before in this forum, but no luck. My simple program:

    Please Login or Register  to view this content.
    loops through a column of data and hides the row of any gray cell in that column. The problem is that the gray cells are grayed due to conditional formatting. Instead of reading the .ColorIndex property as "15", it reads it as "-4142", regardless of the cell's actual background color.

    Is there a way around this?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Akronpow,

    Yes, you can and here is how...

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    11-25-2005
    Posts
    19
    I put this in and it's hiding all rows through iRow. It's doing so because for every cell in the column, the first format condition always has a .ColorIndex of 15. Likewise, every cell's second format condition is a red background. The revised code is hiding all rows whether the cell is actually gray or not.

    So I guess a way to rephrase the question is: can you read whether or not the first format condition is actually in effect for the selected cell in the column?

+ 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