+ Reply to Thread
Results 1 to 6 of 6

Count conditional formatting

  1. #1
    gocats
    Guest

    Count conditional formatting

    Part A) If only 1 cell in a range does has ColorIndex = 0, how can I then set
    its interior color to something else?

    Part B) If only cell in a relative postion in a multiple range has
    ColorIndex = 0, how can I then set its interior color to something else?



  2. #2
    Tom Ogilvy
    Guest

    Re: Count conditional formatting

    ActiveCell.Interior.ColorIndex = 21

    ActiveCell.Offset(0,3).Interior.colorIndex = 21

    If you want a uniform color index

    Selection.Interior.ColorIndex = 21

    --
    Regards,
    Tom Ogilvy


    "gocats" <[email protected]> wrote in message
    news:[email protected]...
    > Part A) If only 1 cell in a range does has ColorIndex = 0, how can I then

    set
    > its interior color to something else?
    >
    > Part B) If only cell in a relative postion in a multiple range has
    > ColorIndex = 0, how can I then set its interior color to something else?
    >
    >




  3. #3
    Tom Ogilvy
    Guest

    Re: Count conditional formatting

    Your subject says count conditional formatting, but your question doesn't
    seem to pertain to conditional formatting. Perhaps you could restate your
    question to give a clearer indication of what you are trying to do and what
    the actual conditions are.

    --
    Regards,
    Tom Ogilvy

    "Tom Ogilvy" <[email protected]> wrote in message
    news:ekr$RG%[email protected]...
    > ActiveCell.Interior.ColorIndex = 21
    >
    > ActiveCell.Offset(0,3).Interior.colorIndex = 21
    >
    > If you want a uniform color index
    >
    > Selection.Interior.ColorIndex = 21
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "gocats" <[email protected]> wrote in message
    > news:[email protected]...
    > > Part A) If only 1 cell in a range does has ColorIndex = 0, how can I

    then
    > set
    > > its interior color to something else?
    > >
    > > Part B) If only cell in a relative postion in a multiple range has
    > > ColorIndex = 0, how can I then set its interior color to something else?
    > >
    > >

    >
    >




  4. #4
    gocats
    Guest

    Re: count Interior.colorIndex

    Thanks Tom, but I dont' think you have not quite understood my problem.

    All cells in a range (and qroup of ranges) are subject to conditional
    formatting. However, if only one cell has Interior.colorIndex = 0, I then
    want that one cell to have Interior.colorIndex = 1.

    In addition the second part is, if only one cell in a relative postion in
    multiple ranges has Interior.colorIndex = 0, then I want that one cell to
    have Interior.colorIndex = 1.

    "Tom Ogilvy" wrote:

    > Your subject says count conditional formatting, but your question doesn't
    > seem to pertain to conditional formatting. Perhaps you could restate your
    > question to give a clearer indication of what you are trying to do and what
    > the actual conditions are.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Tom Ogilvy" <[email protected]> wrote in message
    > news:ekr$RG%[email protected]...
    > > ActiveCell.Interior.ColorIndex = 21
    > >
    > > ActiveCell.Offset(0,3).Interior.colorIndex = 21
    > >
    > > If you want a uniform color index
    > >
    > > Selection.Interior.ColorIndex = 21
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "gocats" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Part A) If only 1 cell in a range does has ColorIndex = 0, how can I

    > then
    > > set
    > > > its interior color to something else?
    > > >
    > > > Part B) If only cell in a relative postion in a multiple range has
    > > > ColorIndex = 0, how can I then set its interior color to something else?
    > > >
    > > >

    > >
    > >

    >
    >
    >


  5. #5
    Tom Ogilvy
    Guest

    Re: count Interior.colorIndex

    conditional formatting colors can not be directly determined using VBA. You
    would have to test the underlying condition that would cause the color to
    change. So you would have to loop through you range and determine how many
    cells in the range meet the condition to be other than coloridex 0 and that
    one only is actually colorindex 0. then you would have to remove
    conditional formatting from that cell or change the colorindex for the
    conditional formatting.

    --
    Regards,
    Tom Ogivy

    "gocats" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks Tom, but I dont' think you have not quite understood my problem.
    >
    > All cells in a range (and qroup of ranges) are subject to conditional
    > formatting. However, if only one cell has Interior.colorIndex = 0, I

    then
    > want that one cell to have Interior.colorIndex = 1.
    >
    > In addition the second part is, if only one cell in a relative postion in
    > multiple ranges has Interior.colorIndex = 0, then I want that one cell

    to
    > have Interior.colorIndex = 1.
    >
    > "Tom Ogilvy" wrote:
    >
    > > Your subject says count conditional formatting, but your question

    doesn't
    > > seem to pertain to conditional formatting. Perhaps you could restate

    your
    > > question to give a clearer indication of what you are trying to do and

    what
    > > the actual conditions are.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "Tom Ogilvy" <[email protected]> wrote in message
    > > news:ekr$RG%[email protected]...
    > > > ActiveCell.Interior.ColorIndex = 21
    > > >
    > > > ActiveCell.Offset(0,3).Interior.colorIndex = 21
    > > >
    > > > If you want a uniform color index
    > > >
    > > > Selection.Interior.ColorIndex = 21
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > >
    > > > "gocats" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > Part A) If only 1 cell in a range does has ColorIndex = 0, how can I

    > > then
    > > > set
    > > > > its interior color to something else?
    > > > >
    > > > > Part B) If only cell in a relative postion in a multiple range has
    > > > > ColorIndex = 0, how can I then set its interior color to something

    else?
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >
    > >




  6. #6
    gocats
    Guest

    Re: count Interior.colorIndex

    Thanks Tom.

    It looks like I will have to try something else.

    "Tom Ogilvy" wrote:

    > conditional formatting colors can not be directly determined using VBA. You
    > would have to test the underlying condition that would cause the color to
    > change. So you would have to loop through you range and determine how many
    > cells in the range meet the condition to be other than coloridex 0 and that
    > one only is actually colorindex 0. then you would have to remove
    > conditional formatting from that cell or change the colorindex for the
    > conditional formatting.
    >
    > --
    > Regards,
    > Tom Ogivy
    >
    > "gocats" <[email protected]> wrote in message
    > news:[email protected]...
    > > Thanks Tom, but I dont' think you have not quite understood my problem.
    > >
    > > All cells in a range (and qroup of ranges) are subject to conditional
    > > formatting. However, if only one cell has Interior.colorIndex = 0, I

    > then
    > > want that one cell to have Interior.colorIndex = 1.
    > >
    > > In addition the second part is, if only one cell in a relative postion in
    > > multiple ranges has Interior.colorIndex = 0, then I want that one cell

    > to
    > > have Interior.colorIndex = 1.
    > >
    > > "Tom Ogilvy" wrote:
    > >
    > > > Your subject says count conditional formatting, but your question

    > doesn't
    > > > seem to pertain to conditional formatting. Perhaps you could restate

    > your
    > > > question to give a clearer indication of what you are trying to do and

    > what
    > > > the actual conditions are.
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > > "Tom Ogilvy" <[email protected]> wrote in message
    > > > news:ekr$RG%[email protected]...
    > > > > ActiveCell.Interior.ColorIndex = 21
    > > > >
    > > > > ActiveCell.Offset(0,3).Interior.colorIndex = 21
    > > > >
    > > > > If you want a uniform color index
    > > > >
    > > > > Selection.Interior.ColorIndex = 21
    > > > >
    > > > > --
    > > > > Regards,
    > > > > Tom Ogilvy
    > > > >
    > > > >
    > > > > "gocats" <[email protected]> wrote in message
    > > > > news:[email protected]...
    > > > > > Part A) If only 1 cell in a range does has ColorIndex = 0, how can I
    > > > then
    > > > > set
    > > > > > its interior color to something else?
    > > > > >
    > > > > > Part B) If only cell in a relative postion in a multiple range has
    > > > > > ColorIndex = 0, how can I then set its interior color to something

    > else?
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > > >

    >
    >
    >


+ 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