+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting two rows at a time

  1. #1
    Mike K
    Guest

    Conditional formatting two rows at a time

    Given a data set of the following:

    City, Some number
    Atlanta, 4
    Altanta, 7
    Dallas, 3
    Dallas, 1
    Toronto, 8
    Toronto, 10
    Trenton, 12
    Trenton, 1

    Can I do conditional formatting so that each set of two rows has
    alternating colors? For example, the two rows with Atlanta are
    highlighted yellow, Dallas white, Toronto yellow, Trenton white.


  2. #2
    Dave Peterson
    Guest

    Re: Conditional formatting two rows at a time

    Maybe use format|conditional formatting.

    Select your range A2:Bxxx (headers in row 1??)

    Then with A2 the activecell
    format|conditional formatting
    formula is:
    =MOD(ROW(A2),4)<2
    And give it a nice yellow pattern.

    Mike K wrote:
    >
    > Given a data set of the following:
    >
    > City, Some number
    > Atlanta, 4
    > Altanta, 7
    > Dallas, 3
    > Dallas, 1
    > Toronto, 8
    > Toronto, 10
    > Trenton, 12
    > Trenton, 1
    >
    > Can I do conditional formatting so that each set of two rows has
    > alternating colors? For example, the two rows with Atlanta are
    > highlighted yellow, Dallas white, Toronto yellow, Trenton white.


    --

    Dave Peterson

  3. #3
    Mike K
    Guest

    Re: Conditional formatting two rows at a time

    Perfect, thanks so much Dave.


  4. #4
    David McRitchie
    Guest

    Re: Conditional formatting two rows at a time

    If A2 is the active cell for
    =MOD(ROW(A2),4)<2
    you could simply code as
    =MOD(ROW(),4)<2
    for exactly the same meaning and effect.


    "Dave Peterson" <[email protected]> wrote in message news:[email protected]...
    > Maybe use format|conditional formatting.
    >
    > Select your range A2:Bxxx (headers in row 1??)
    >
    > Then with A2 the activecell
    > format|conditional formatting
    > formula is:
    > =MOD(ROW(A2),4)<2
    > And give it a nice yellow pattern.
    >
    > Mike K wrote:
    > >
    > > Given a data set of the following:
    > >
    > > City, Some number
    > > Atlanta, 4
    > > Altanta, 7
    > > Dallas, 3
    > > Dallas, 1
    > > Toronto, 8
    > > Toronto, 10
    > > Trenton, 12
    > > Trenton, 1
    > >
    > > Can I do conditional formatting so that each set of two rows has
    > > alternating colors? For example, the two rows with Atlanta are
    > > highlighted yellow, Dallas white, Toronto yellow, Trenton white.

    >
    > --
    >
    > Dave Peterson




  5. #5
    Dave Peterson
    Guest

    Re: Conditional formatting two rows at a time

    You are correct, sir!

    David McRitchie wrote:
    >
    > If A2 is the active cell for
    > =MOD(ROW(A2),4)<2
    > you could simply code as
    > =MOD(ROW(),4)<2
    > for exactly the same meaning and effect.
    >
    > "Dave Peterson" <[email protected]> wrote in message news:[email protected]...
    > > Maybe use format|conditional formatting.
    > >
    > > Select your range A2:Bxxx (headers in row 1??)
    > >
    > > Then with A2 the activecell
    > > format|conditional formatting
    > > formula is:
    > > =MOD(ROW(A2),4)<2
    > > And give it a nice yellow pattern.
    > >
    > > Mike K wrote:
    > > >
    > > > Given a data set of the following:
    > > >
    > > > City, Some number
    > > > Atlanta, 4
    > > > Altanta, 7
    > > > Dallas, 3
    > > > Dallas, 1
    > > > Toronto, 8
    > > > Toronto, 10
    > > > Trenton, 12
    > > > Trenton, 1
    > > >
    > > > Can I do conditional formatting so that each set of two rows has
    > > > alternating colors? For example, the two rows with Atlanta are
    > > > highlighted yellow, Dallas white, Toronto yellow, Trenton white.

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

+ 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