LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Here's one method you could try.

You need a helper column for each column that you want to compare. In your
example you're comparing 2 columns so you need 2 helper columns. Also, there
should be an empty row above the start of your data. So, if your data starts
in row 2 and row 1 is empty:

Based on Harlan Grove's formulas for counting consecutive cells:

In C2 enter this formula and copy across to D2:

=IF(A3<A2,1,"")

In C3 enter this formula and copy across to D3:

=IF(A4<A3,ROWS(C$2:C3)-IF(COUNT(C$2:C2),LOOKUP(2,1/ISNUMBER(C$2:C2),ROW(C$2:C2)-1),0),"")

Select both C3 and D3 and copy down to the end of your data.

Now, since you wanted to identify 5 consecutive entries and based on your
sample data, cells C9 and D9 should equal 5.

Now, use conditional formatting.

Select the rows in which your data resides. In your example this would be
rows 2:14.

Goto FormatConditional Formatting
Formula is: =AND($C2=5,$D2=5)
Select a format style. Maybe a background fill color.
OK out.

This will only highlight a single row. Maybe if I had more time I could
figure out how to highlight all 5 rows but this will at least get you headed
in the right direction.

Biff

"carl" wrote in message
...
I am trying to highlight rows in my data to make it possible to spot
patterns. For example, in the table below is it possible to highlight the
rows when there are 5 consecutive identical values in ColA and ColB. In
the
table, rows 4,5,6,7,8 would be highlighted but rows 9,10,11,12,13 would
not
be.

Thank you in advance.

Row ColA ColB
1 ABC 123
2 DEF 456
3 HIJ 789
4 ABC 123
5 ABC 123
6 ABC 123
7 ABC 123
8 ABC 123
9 DEF 456
10 DEF 456
11 DEF 456
12 DEF 456
13 DEF 123



 
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
How do i create a conditional sum? tmiller708 Excel Worksheet Functions 2 May 5th 05 01:58 AM
conditional formatting conflict? Abi Excel Worksheet Functions 2 January 11th 05 03:41 PM
Determine cells that drive conditional formatting? Nicolle K. Excel Discussion (Misc queries) 2 January 7th 05 01:08 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM
copy conditional format as ACTUAL format Dana Zulager Excel Discussion (Misc queries) 7 December 7th 04 11:02 PM


All times are GMT +1. The time now is 05:15 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"