LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi Ronbo,

I actually tested the CF formulas in a trial Excel spreadsheet before
posting my suggestion to you. The CF works (shades alternate rows, and also
shows negative values in red font regardless of whether they are in shaded
rows or not; furthermore, it works regardless of whether the cell contents
are formatted as number, currency, or percentage).
I am giving the formulas again. In the Conditional Formatting window,
select the 'Formula Is' (and not the 'Cell Value Is') option. For condition
1, the rows are shaded and the font is colored red (or whatever color you
want); for condition 2, the rows are shaded but the font color is the default
color (black); and for condition 3, there is no shading for the rows but the
font is colored red.

Conditn 1: Formula Is =AND(A1<0,MOD(ROW(),2)=0)
Conditn 2: Formula Is =AND(A1=0,MOD(ROW(),2)=0)
Conditn 3: Formula Is =AND(A1<0,MOD(ROW(),2)=1)

Regards,
B.R. Ramachandran

"Ronbo" wrote:

B. R.Ramachandran

Thanks for your help, however it did not work. It stripped the "Alternative
Row Shading" (*1) away.

What I did was highlighted rows 20:100 then did a conditional format of;
=MOD(ROW(),2)=0 (*1)

This works perfect. It alternatively shades rows the color you want and it
fixes the color to the row so that when sorting/adding/deleting it will still
have alternatively shaded rows.

I want to shade all negitive numbers red. For dollars I "Format Cells" with
Dollars - (red) and it works perfect. But with percentage that option is not
available. So I have been trying conditional formating and the above
suggestions, but nothing works for percentage.

Again any help is appreciated.

(*1) The code is from John Walenback at j-walk.com. Sorry I did not
recognize this before, but I did not have the programmers name.









"B. R.Ramachandran" wrote:

Yes, you need three CFs.

CF1: =AND(A1<0,MOD(ROW(),2)=0) (shade cell and red font)
CF2: =AND(A1=0,MOD(ROW(),2)=0) (shade cell and black font)
CF3: =AND(A1<0,MOD(ROW(),2)=1) (no shade and red font)

Regards,
B.R.Ramachandran

"Ronbo" wrote:

The first conditional format is "=MOD(ROW(),2)=0". This auto shades every
other row and fixs the rows color so if I do a sort the rows will still be
shaded every other row.

The second Conditional Format is to color the font red if less than 0.
However, if a negitive number is in a row that has been shaded, the font will
not trun red, in the other rows the negatives are red.

What can I do to have both the shaded cell and red negative numbers?

As always, any help is very much appreciated.

 
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
list all conditional formats Dave Breitenbach Excel Worksheet Functions 1 May 23rd 05 07:29 PM
How do I add more Conditional Formats? Saint Excel Discussion (Misc queries) 2 April 26th 05 07:30 PM
how do I apply more than 3 conditional formats in excel chetwyndthomas Excel Discussion (Misc queries) 1 January 30th 05 04:24 PM
how do i get more than three conditional formats in excel Tom_t Excel Worksheet Functions 1 December 15th 04 07:35 AM
Conditional Formats in Excel DaveB Excel Worksheet Functions 2 November 15th 04 07:36 AM


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