Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default conditional formating adjacent rows

Greetings

I have sheet with some numbers in rows A1:A10
Number in adjacent rows can repeat so I want to color all rows having the
same values wih two alternating colours,

eg:
CELL VALUE ROW COLOUR
A1 1 WHITE
A2 1 WHITE
A3 4 GREY
A4 5 WHITE
A5 5 WHITE
A6 5 WHITE
A7 8 GREY
A8 10 WHITE
A9 10 WHITE
A10 12 GREY

i'e I want to alternatingly group and colour rows using only two colours eg
grey or white. The conditional formatting should only change colours when a
different value is found as rows are decended from top to bottom.

I have tried this formula (=$A1=$A2) but it sort of leaves out the boundary
cells

Any help will be appreciated

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default conditional formating adjacent rows

Try this...

I have sheet with some numbers in rows A1:A10


Select the range A1:A10
Goto the menu FormatConditional Formatting
Select the Formula Is option
Enter this formula in the box on the right:
=COUNTIF(A$1:A$10,A1)=1
Click the Format button
Select the desired style(s)
OK out

--
Biff
Microsoft Excel MVP


"mydisplayname" wrote in message
...
Greetings

I have sheet with some numbers in rows A1:A10
Number in adjacent rows can repeat so I want to color all rows having the
same values wih two alternating colours,

eg:
CELL VALUE ROW COLOUR
A1 1 WHITE
A2 1 WHITE
A3 4 GREY
A4 5 WHITE
A5 5 WHITE
A6 5 WHITE
A7 8 GREY
A8 10 WHITE
A9 10 WHITE
A10 12 GREY

i'e I want to alternatingly group and colour rows using only two colours
eg
grey or white. The conditional formatting should only change colours when
a
different value is found as rows are decended from top to bottom.

I have tried this formula (=$A1=$A2) but it sort of leaves out the
boundary
cells

Any help will be appreciated



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default conditional formating adjacent rows

I don't think so, Biff. If the OP had 4 in A4, then s/he would also
want it to be grey.

I think that the number of discreet numbers would need to be counted,
and if odd they should be white and if even then grey, but the formula
seemed too complex when I tried it earlier.

Pete

On Sep 8, 4:45*pm, "T. Valko" wrote:
Try this...

I have sheet with some numbers in rows A1:A10


Select the range A1:A10
Goto the menu FormatConditional Formatting
Select the Formula Is option
Enter this formula in the box on the right:
=COUNTIF(A$1:A$10,A1)=1
Click the Format button
Select the desired style(s)
OK out

--
Biff
Microsoft Excel MVP

"mydisplayname" wrote in message

...



Greetings


I have sheet with some numbers in rows A1:A10
Number in adjacent rows can repeat so I want to color all rows having the
same values wih two alternating colours,


eg:
CELL *VALUE * * ROW COLOUR
A1 * * 1 * * * * * *WHITE
A2 * * 1 * * * * * *WHITE
A3 * * 4 * * * * * *GREY
A4 * * 5 * * * * * *WHITE
A5 * * 5 * * * * * *WHITE
A6 * * 5 * * * * * *WHITE
A7 * * 8 * * * * * *GREY
A8 * * 10 * * * * *WHITE
A9 * * 10 * * * * *WHITE
A10 * 12 * * * * * GREY


i'e I want to alternatingly group and colour rows using only two colours
eg
grey or white. The conditional formatting should only change colours when
a
different value is found as rows are decended from top to bottom.


I have tried this formula (=$A1=$A2) but it sort of leaves out the
boundary
cells


Any help will be appreciated- Hide quoted text -


- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default conditional formating adjacent rows

Hmmm...

I may have (probably!) misunderstood what they want.

So, try this...

Select the range *A2:A10*
Formula Is:

=MOD(SUMPRODUCT(--(A$1:A1<A$2:A2)),2)

This will slow things down if the range to format is 1000's of rows.

--
Biff
Microsoft Excel MVP


"Pete_UK" wrote in message
...
I don't think so, Biff. If the OP had 4 in A4, then s/he would also
want it to be grey.

I think that the number of discreet numbers would need to be counted,
and if odd they should be white and if even then grey, but the formula
seemed too complex when I tried it earlier.

Pete

On Sep 8, 4:45 pm, "T. Valko" wrote:
Try this...

I have sheet with some numbers in rows A1:A10


Select the range A1:A10
Goto the menu FormatConditional Formatting
Select the Formula Is option
Enter this formula in the box on the right:
=COUNTIF(A$1:A$10,A1)=1
Click the Format button
Select the desired style(s)
OK out

--
Biff
Microsoft Excel MVP

"mydisplayname" wrote in message

...



Greetings


I have sheet with some numbers in rows A1:A10
Number in adjacent rows can repeat so I want to color all rows having
the
same values wih two alternating colours,


eg:
CELL VALUE ROW COLOUR
A1 1 WHITE
A2 1 WHITE
A3 4 GREY
A4 5 WHITE
A5 5 WHITE
A6 5 WHITE
A7 8 GREY
A8 10 WHITE
A9 10 WHITE
A10 12 GREY


i'e I want to alternatingly group and colour rows using only two colours
eg
grey or white. The conditional formatting should only change colours
when
a
different value is found as rows are decended from top to bottom.


I have tried this formula (=$A1=$A2) but it sort of leaves out the
boundary
cells


Any help will be appreciated- Hide quoted text -


- Show quoted text -



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default conditional formating adjacent rows

Yes, that seemed to work - well done !

Pete

On Sep 8, 5:09*pm, "T. Valko" wrote:
Hmmm...

I may have (probably!) misunderstood what they want.

So, try this...

Select the range *A2:A10*
Formula Is:

=MOD(SUMPRODUCT(--(A$1:A1<A$2:A2)),2)

This will slow things down if the range to format is 1000's of rows.

--
Biff
Microsoft Excel MVP

"Pete_UK" wrote in message

...
I don't think so, Biff. If the OP had 4 in A4, then s/he would also
want it to be grey.

I think that the number of discreet numbers would need to be counted,
and if odd they should be white and if even then grey, but the formula
seemed too complex when I tried it earlier.

Pete

On Sep 8, 4:45 pm, "T. Valko" wrote:



Try this...


I have sheet with some numbers in rows A1:A10


Select the range A1:A10
Goto the menu FormatConditional Formatting
Select the Formula Is option
Enter this formula in the box on the right:
=COUNTIF(A$1:A$10,A1)=1
Click the Format button
Select the desired style(s)
OK out


--
Biff
Microsoft Excel MVP


"mydisplayname" wrote in message


...


Greetings


I have sheet with some numbers in rows A1:A10
Number in adjacent rows can repeat so I want to color all rows having
the
same values wih two alternating colours,


eg:
CELL VALUE ROW COLOUR
A1 1 WHITE
A2 1 WHITE
A3 4 GREY
A4 5 WHITE
A5 5 WHITE
A6 5 WHITE
A7 8 GREY
A8 10 WHITE
A9 10 WHITE
A10 12 GREY


i'e I want to alternatingly group and colour rows using only two colours
eg
grey or white. The conditional formatting should only change colours
when
a
different value is found as rows are decended from top to bottom.


I have tried this formula (=$A1=$A2) but it sort of leaves out the
boundary
cells


Any help will be appreciated- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -




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
Compare adjacent fields in adjacent rows Quimera New Users to Excel 6 May 30th 08 11:36 AM
conditional formating on rows & cols depending on one cell bandy2000 Excel Discussion (Misc queries) 1 March 7th 06 11:46 PM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
conditional formating of group of columns and rows Madhav Excel Worksheet Functions 0 March 8th 05 06:21 PM
Help using Conditional Formating of Entire Rows [email protected] Excel Worksheet Functions 4 February 16th 05 04:29 PM


All times are GMT +1. The time now is 04:42 PM.

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"