Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default fill cells with colour if content of another cell has CR

I would like to fill colour the range A6:AV6 with red if the content of cell
AP7 is CR
I need to do this then for about 75 to 80 rows below this so next row would
be looking for CR in cell AP8 etc. If I can do it without code, great. Any
help appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
GB GB is offline
external usenet poster
 
Posts: 230
Default fill cells with colour if content of another cell has CR

You can use conditional formatting in excel...
Select Cell A6
From the Toolbar: Format- Conditional Formatting...

Then using

Formula Is, =(CellLocation="CR")

Where CellLocation would be something like $AP$7
So
Formula Is, =($AP$7="CR")

and then select the Format... button and choose the format that you wish to
apply for that condition.

Then if you copy cell A6 and then highlight the range that is supposed to
change colors/formats in relation to cell AP7, pastespecial Format.

Then you can pastespecial into the first cell of the next group, change the
conditional formatting to reference Cell $AP$8 and reperform the copy and
pastespecial.


" Inserting an option button in Word" wrote:

I would like to fill colour the range A6:AV6 with red if the content of cell
AP7 is CR
I need to do this then for about 75 to 80 rows below this so next row would
be looking for CR in cell AP8 etc. If I can do it without code, great. Any
help appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default fill cells with colour if content of another cell has CR

"GB" writes:

:" Inserting an option button in Word" wrote:

: I would like to fill colour the range A6:AV6 with red if the content of
: cell AP7 is CR I need to do this then for about 75 to 80 rows below this so
: next row would be looking for CR in cell AP8 etc. If I can do it without
: code, great. Any help appreciated.

:You can use conditional formatting in excel...
:Select Cell A6
:From the Toolbar: Format- Conditional Formatting...

:Then using
:Formula Is, =(CellLocation="CR")

:Where CellLocation would be something like $AP$7
:So
:Formula Is, =($AP$7="CR")

:and then select the Format... button and choose the format that you wish to
:apply for that condition.

:Then if you copy cell A6 and then highlight the range that is supposed to
:change colors/formats in relation to cell AP7, pastespecial Format.

:Then you can pastespecial into the first cell of the next group, change the
:conditional formatting to reference Cell $AP$8 and reperform the copy and
:pastespecial.

That will work for one special format case, but are you limited to just three
conditions in any given cell? I'm working on a sheet that will have two
separate columns of readings, and I'm trying to format them as the original
poster is, but in six different categories. (One will require no formatting.
The rest will wind up with a different font color and weight, and different
fill color.)

--
Patrick "The Chief Instigator" Humphrey ) Houston, Texas
chiefinstigator.us.tt/aeros.php (soon to be TCI's 2005-06 Houston Aeros)
LAST GAME: Chicago 5, Houston 3 (April 26)
NEXT GAME: Date/opponent/site TBA in August 2005
  #4   Report Post  
Posted to microsoft.public.excel.programming
GB GB is offline
external usenet poster
 
Posts: 230
Default fill cells with colour if content of another cell has CR

I did reply to this, however I don't see it on here yet, and I need to depart.

Basically, yes can do it, but would require VBA coding on the worksheet,
checking for changes in cells, and if the "desired" cell(s) change, then
implement the corresponding format change to the location(s) desired.

I'll check back later to see if my original reply made it to the site.

"The Chief Instigator" wrote:

"GB" writes:

:" Inserting an option button in Word" wrote:

: I would like to fill colour the range A6:AV6 with red if the content of
: cell AP7 is CR I need to do this then for about 75 to 80 rows below this so
: next row would be looking for CR in cell AP8 etc. If I can do it without
: code, great. Any help appreciated.

:You can use conditional formatting in excel...
:Select Cell A6
:From the Toolbar: Format- Conditional Formatting...

:Then using
:Formula Is, =(CellLocation="CR")

:Where CellLocation would be something like $AP$7
:So
:Formula Is, =($AP$7="CR")

:and then select the Format... button and choose the format that you wish to
:apply for that condition.

:Then if you copy cell A6 and then highlight the range that is supposed to
:change colors/formats in relation to cell AP7, pastespecial Format.

:Then you can pastespecial into the first cell of the next group, change the
:conditional formatting to reference Cell $AP$8 and reperform the copy and
:pastespecial.

That will work for one special format case, but are you limited to just three
conditions in any given cell? I'm working on a sheet that will have two
separate columns of readings, and I'm trying to format them as the original
poster is, but in six different categories. (One will require no formatting.
The rest will wind up with a different font color and weight, and different
fill color.)

--
Patrick "The Chief Instigator" Humphrey ) Houston, Texas
chiefinstigator.us.tt/aeros.php (soon to be TCI's 2005-06 Houston Aeros)
LAST GAME: Chicago 5, Houston 3 (April 26)
NEXT GAME: Date/opponent/site TBA in August 2005

  #5   Report Post  
Posted to microsoft.public.excel.programming
GB GB is offline
external usenet poster
 
Posts: 230
Default fill cells with colour if content of another cell has CR

Okay looks like my original reply didn't make it here, so I will try to
reconstruct it.

Basically this is what I had recommended to do and to address your concern
of changing a single cell based on matching to more than 3 criteria.

You can use VBA code that is tied to the sheet that has the cells you want
to "watch". You will want to catch changes to the worksheet by having code
in the Worksheet_Change subroutine..

If you let VBA create the subroutine, it will provide a variable called
Target which can contain one or more cells from a range, so you would need to
iterate through each item in the target variable, if one of the cells changed
in the target matches the cell(s) you are wanting to "watch" then you can
have it set the format of the cell you want to change. You may have to setup
your data so that you can do math functions on it, or if there is a row to
row comparison, (i.e., if something in Row 1, Column 1 changes, then change
something in Row 1, Column 2) then the programming is a lot easier.

Anyways, you are correct, at least as far as I am currently able to tell
that there are only a maximum of 3 conditional format tests that can be
performed. So for your case of 6 conditions will require you would to use
VBA code.
Unless someone else knows of a better way.

"The Chief Instigator" wrote:

"GB" writes:

:" Inserting an option button in Word" wrote:

: I would like to fill colour the range A6:AV6 with red if the content of
: cell AP7 is CR I need to do this then for about 75 to 80 rows below this so
: next row would be looking for CR in cell AP8 etc. If I can do it without
: code, great. Any help appreciated.

:You can use conditional formatting in excel...
:Select Cell A6
:From the Toolbar: Format- Conditional Formatting...

:Then using
:Formula Is, =(CellLocation="CR")

:Where CellLocation would be something like $AP$7
:So
:Formula Is, =($AP$7="CR")

:and then select the Format... button and choose the format that you wish to
:apply for that condition.

:Then if you copy cell A6 and then highlight the range that is supposed to
:change colors/formats in relation to cell AP7, pastespecial Format.

:Then you can pastespecial into the first cell of the next group, change the
:conditional formatting to reference Cell $AP$8 and reperform the copy and
:pastespecial.

That will work for one special format case, but are you limited to just three
conditions in any given cell? I'm working on a sheet that will have two
separate columns of readings, and I'm trying to format them as the original
poster is, but in six different categories. (One will require no formatting.
The rest will wind up with a different font color and weight, and different
fill color.)

--
Patrick "The Chief Instigator" Humphrey ) Houston, Texas
chiefinstigator.us.tt/aeros.php (soon to be TCI's 2005-06 Houston Aeros)
LAST GAME: Chicago 5, Houston 3 (April 26)
NEXT GAME: Date/opponent/site TBA in August 2005

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
HOW DO I: Automatically colour a row according to cell content. Rob McInnes Excel Discussion (Misc queries) 1 May 22nd 08 06:35 PM
Change colour of cells when content is altered/changed BUT NOT TO INSERTED OR DELETED ROWS Martin ©¿©¬ @nohere.net Excel Discussion (Misc queries) 3 April 12th 08 05:13 PM
Change colour of cells when content is altered/changed Martin ©¿©¬ [email protected] Excel Discussion (Misc queries) 8 December 8th 06 05:37 PM
Colour Cell based on Content Steve Excel Worksheet Functions 3 March 10th 06 03:51 PM
changing the colour of cells depending on the content. johnny.exe Excel Discussion (Misc queries) 3 January 26th 06 09:41 AM


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