#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default red row


hi, is it possible to put a all row in red when one of its cell has a
negative amount ?
thx


--
doudou
------------------------------------------------------------------------
doudou's Profile: http://www.excelforum.com/member.php...o&userid=24047
View this thread: http://www.excelforum.com/showthread...hreadid=399294

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default red row

You can use format|conditional formatting:

Select your rows of data (I used 1:10).
then with the activecell in row 1
format|conditional formatting
formula is:
=COUNTIF(1:1,"<0")0

and give it a nice format.

doudou wrote:

hi, is it possible to put a all row in red when one of its cell has a
negative amount ?
thx

--
doudou
------------------------------------------------------------------------
doudou's Profile: http://www.excelforum.com/member.php...o&userid=24047
View this thread: http://www.excelforum.com/showthread...hreadid=399294


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default red row

Hi doudou,

You don't really need programming for this you can use Conditional Formatting
http://www.mvps.org/dmcritchie/excel/excel.htm

If you really mean any cell on the row select the entire worksheet
with cell A1 active
=A1<0

If you mean column F then
=$F1<0

If you mean Columns C:F then
=MIN($C1:$F1)<0

If you want a programming solution then you are looking for
something along the lines of
cell.ENTIREROW.interior.colorindex = 3
or possibly
cell.ENTIREROW.font.colorindex = 3
http://www.mvps.org/dmcritchie/excel/colors.htm
and possibly in a Change Event macro
http://www.mvps.org/dmcritchie/excel/event.htm#case
with a change similar to the above.

Your question is answered in the microsoft.public.excel.programming
newsgroups has and nothing whatsoever to do with excelforum.com
except that such postings mess up web searches by including
newsgroup postings.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"doudou" wrote in message
...

hi, is it possible to put a all row in red when one of its cell has a
negative amount ?
thx


--
doudou
------------------------------------------------------------------------
doudou's Profile: http://www.excelforum.com/member.php...o&userid=24047
View this thread: http://www.excelforum.com/showthread...hreadid=399294



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default red row

Don't know what I was thinking =A1<0 would only affect the
cell it is found in. Use Dave Peterson's solution.


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



All times are GMT +1. The time now is 10:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"