Brian Barker wrote:
At 10:55 15/05/2010 -0500, Michael Noname wrote:
I have inherited a worksheet, a rather large office directory, where every other line is highlighted. By highlighted, I mean the row's background color is set to 15% gray. This issue is that whenever the directory is updated, it messes up the every-other-row-is-highlighted format.

Why should that be? Perhaps you mean that you may be inserting or deleting rows?

Yes, this is what I meant.  You extrapolated correctly.
Other than going in and changing each row manually, is there a function/macro that will do this automatically on a selected area?

First, remove the existing background formatting.

Secondly, create an appropriate cell style with the grey background:
o Go to Format | Style and Formatting (or click the Styles and Formatting button in the Formatting toolbar, or press F11).
o  Click the Cell Styles button.
o  Click the New Style from Selection button.
o  Give your new style a name - perhaps "Grey".
o  Right-click the new style name in the list and select Modify... .
o  On the Background tab, select your shade of grey.

Now apply this cell style appropriately:
o  Select the required region of the spreadsheet.
o  Go to Format | Conditional Formatting... .
o  Select "Formula is" from the drop-down menu.
o  Enter MOD(ROW();2) into the formula box.
o  Select your new cell style from the Cell Style drop-down menu.

If this colours the wrong set of rows and you want to colour the others instead, use MOD(ROW()+1;2).

Thank you for any _constructive_ input you may have to offer.

It's unfortunate that you should make this restriction. You are asking for help and then suggesting in advance that you might reject it. In fact, destructive help is often helpful, even to the extent that "throw this away and start again" might be the best advice. You'll be happy to hear, though, that it isn't in this case.

Yes, but my self esteem is low, making me overly sensitive to criticism.  ;)
I trust this helps.

It did indeed.  It was exactly what I was looking for.  Thank you very much.
Brian Barker


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to