Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Changing color of a row

Is there any way to change the color of the row based on the value of PM in
the cell and then check the rest of the spreadsheet for the PM value and
change the color of the rest of the row? See example below.

Project Amount PM Color desired
123 125000 DG red
234 26715 CG blue
345 1243 EG green
456 258000 CG blue
567 12589 CG blue
678 77500 DG red
789 65875 EG green

  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Changing color of a row

for three colors you can use conditonal formatting
select all
format-conditional format
criteria 1
formula is =or($A1=123,$A1=678)
set fomat red
criteria 2
formula is =or($A1=234,$A1=456,$A1=567)
set fomat blue
etc

unfortunately before 2007 only three conditonal formats can be used.
"David G" wrote:

Is there any way to change the color of the row based on the value of PM in
the cell and then check the rest of the spreadsheet for the PM value and
change the color of the rest of the row? See example below.

Project Amount PM Color desired
123 125000 DG red
234 26715 CG blue
345 1243 EG green
456 258000 CG blue
567 12589 CG blue
678 77500 DG red
789 65875 EG green

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Changing color of a row

Is there a way in VB that a for next loop could be setup to check the whole
spreadsheet and change the color based on the value of the PM?

"bj" wrote:

for three colors you can use conditonal formatting
select all
format-conditional format
criteria 1
formula is =or($A1=123,$A1=678)
set fomat red
criteria 2
formula is =or($A1=234,$A1=456,$A1=567)
set fomat blue
etc

unfortunately before 2007 only three conditonal formats can be used.
"David G" wrote:

Is there any way to change the color of the row based on the value of PM in
the cell and then check the rest of the spreadsheet for the PM value and
change the color of the rest of the row? See example below.

Project Amount PM Color desired
123 125000 DG red
234 26715 CG blue
345 1243 EG green
456 258000 CG blue
567 12589 CG blue
678 77500 DG red
789 65875 EG green

  #4   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Changing color of a row

Actually looking at It I was going against the wrong column.
in a macro you could have something like

for r = 1 to 1000
if cells(r,3)="DG" then
cells(r.3).entirerow.select
With Selection.Interior
.ColorIndex = 3 ' red
.Pattern = xlSolid
End With
end if
if cells(r,3)="DG" then
cells(r.3).entirerow.select
With Selection.Interior
.ColorIndex = 5 ' Blue
.Pattern = xlSolid
End With

etc

next r
end if

ac

"David G" wrote:

Is there a way in VB that a for next loop could be setup to check the whole
spreadsheet and change the color based on the value of the PM?

"bj" wrote:

for three colors you can use conditonal formatting
select all
format-conditional format
criteria 1
formula is =or($A1=123,$A1=678)
set fomat red
criteria 2
formula is =or($A1=234,$A1=456,$A1=567)
set fomat blue
etc

unfortunately before 2007 only three conditonal formats can be used.
"David G" wrote:

Is there any way to change the color of the row based on the value of PM in
the cell and then check the rest of the spreadsheet for the PM value and
change the color of the rest of the row? See example below.

Project Amount PM Color desired
123 125000 DG red
234 26715 CG blue
345 1243 EG green
456 258000 CG blue
567 12589 CG blue
678 77500 DG red
789 65875 EG green

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Button Color Mike Excel Discussion (Misc queries) 0 January 19th 07 08:14 PM
Changing Cell Color GWOOD Excel Worksheet Functions 2 November 10th 05 05:40 PM
changing tab color conditionally ldd Excel Discussion (Misc queries) 1 June 13th 05 01:50 PM
changing the color of the buttons Mr. V Excel Discussion (Misc queries) 4 April 5th 05 02:57 PM
Changing color in color palette Dave Peterson Setting up and Configuration of Excel 0 December 12th 04 02:39 PM


All times are GMT +1. The time now is 09:01 AM.

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"