Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Excel / September 2007



Tip: Looking for answers? Try searching our database.

Macro for formatting grouped rows?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mike.goldman@mac.com - 05 Sep 2007 19:26 GMT
I've been playing with conditional formatting and it's not
accomplishing my task. That is, to apply a gray color band to
alternating groups similar rows in a large excel file. For example, if
all other data in the rows were different, and column E had similar
data, like this:

1
1
3
3
3
3
3
5
6
6
6
6

I'd want all the rows with E=1, E=5, etc. to be gray. Is this possible?
JE McGimpsey - 05 Sep 2007 21:20 GMT
> I've been playing with conditional formatting and it's not
> accomplishing my task. That is, to apply a gray color band to
[quoted text clipped - 16 lines]
>
> I'd want all the rows with E=1, E=5, etc. to be gray. Is this possible?

One way:

Select the sheet (or the desired rows), with any cell in Row 1 active.

Choose Format/Conditional Formatting...

CF1:  Formula is
        =MOD(ROUND(SUMPRODUCT(1/COUNTIF($E$1:$E1,$E$1:$E1)),0),2)=1
Format1:    <pattern>/<gray>
mike.goldman@mac.com - 05 Sep 2007 21:45 GMT
> In article <1189016808.197485.273...@w3g2000hsg.googlegroups.com>,
>
[quoted text clipped - 29 lines]
>          =MOD(ROUND(SUMPRODUCT(1/COUNTIF($E$1:$E1,$E$1:$E1)),0),2)=1
> Format1:    <pattern>/<gray>

Genius. Works like a charm. It amazes me how you guys come up with
this stuff. Thanks much.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.