Consulting

Results 1 to 2 of 2

Thread: Referring to the first and last cell of a range

  1. #1

    Referring to the first and last cell of a range

    Hi everybody
    I have applied a conditional formatting on the range.
    I'd like to refer to the first cell of this range depending on the fill colour that I applied in conditional formatting

    This is the code that I used and succeeded in the normal colouring but with the conditional formatting it fails

    X = 0
    Do
    X = X + 1
    Set Rng2 = Cells(4, X)
    Loop Until Rng2.Interior.ColorIndex = 7

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    What condition triggers the CF?

    Its easier to test for that than it is to test what color the CF has made the cell.

Posting Permissions

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