Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Conditional formatting two rows at a time

Perfect, thanks so much Dave.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default 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" wrote in message ...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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" wrote in message ...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting with time Dale G[_2_] Excel Discussion (Misc queries) 4 December 18th 09 09:24 AM
Conditional Formatting with Time Colin[_4_] Excel Worksheet Functions 6 November 27th 09 01:28 PM
conditional formatting time Dgwood90 Excel Discussion (Misc queries) 7 December 31st 08 04:39 AM
Conditional formatting and time mndpy Excel Worksheet Functions 1 September 4th 07 07:46 PM
Conditional Formatting on Time Scott Excel Programming 4 July 15th 04 07:08 PM


All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"