Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default code to shade row then return it to as it was

This is a repeat post from yesterday which I'm still struggling with. Gary"s
Student offered some help but:
Sheet uses columns "A-AD", rows 4-10000.
Several sets of adjacent columns are shaded (visually grouped together) to
give clarity for the user.
Here's the premise:
Using a formula in column "AB", either "W", "SD", "ST" or "" will be returned.

I need code to look at column "AB" and colour the row (from "A:AD" only)
red, orange or blue for the first 3 options or leave as is for "".
This part is straightforward ChangeEvent code. However, and this is the bit
I can't fathom, if a cell in "AB" is changed from any of the 3 options back
to blank, the original cell shading needs to be re-applied.
Row 3 is the header row for all the columns, so could the fill colour from
that row be used in the code to correctly re-shade the changed row?
I can email worksheet if req'd.
Thanks
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default code to shade row then return it to as it was


use conditional formatting
select columnds D:AD
set the 'cell value is' to 'formula is' and then the formula to

=$AD1-"W" and then set a pattern color
add two more conditions like this for the other two letter patterns

conditional formatting allows three tests, so you got lucky!


"Jock" wrote:

This is a repeat post from yesterday which I'm still struggling with. Gary"s
Student offered some help but:
Sheet uses columns "A-AD", rows 4-10000.
Several sets of adjacent columns are shaded (visually grouped together) to
give clarity for the user.
Here's the premise:
Using a formula in column "AB", either "W", "SD", "ST" or "" will be returned.

I need code to look at column "AB" and colour the row (from "A:AD" only)
red, orange or blue for the first 3 options or leave as is for "".
This part is straightforward ChangeEvent code. However, and this is the bit
I can't fathom, if a cell in "AB" is changed from any of the 3 options back
to blank, the original cell shading needs to be re-applied.
Row 3 is the header row for all the columns, so could the fill colour from
that row be used in the code to correctly re-shade the changed row?
I can email worksheet if req'd.
Thanks
Traa Dy Liooar

Jock

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default code to shade row then return it to as it was

use conditional formatting
select columnds D:AD
set the 'cell value is' to 'formula is' and then the formula to

=$AD1-"W" and then set a pattern color
add two more conditions like this for the other two letter patterns

conditional formatting allows three tests, so you got lucky!



"Jock" wrote:

This is a repeat post from yesterday which I'm still struggling with. Gary"s
Student offered some help but:
Sheet uses columns "A-AD", rows 4-10000.
Several sets of adjacent columns are shaded (visually grouped together) to
give clarity for the user.
Here's the premise:
Using a formula in column "AB", either "W", "SD", "ST" or "" will be returned.

I need code to look at column "AB" and colour the row (from "A:AD" only)
red, orange or blue for the first 3 options or leave as is for "".
This part is straightforward ChangeEvent code. However, and this is the bit
I can't fathom, if a cell in "AB" is changed from any of the 3 options back
to blank, the original cell shading needs to be re-applied.
Row 3 is the header row for all the columns, so could the fill colour from
that row be used in the code to correctly re-shade the changed row?
I can email worksheet if req'd.
Thanks
Traa Dy Liooar

Jock

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default code to shade row then return it to as it was

Ideally, yes; if only it were that simple.
I've used CF on quite a few columns already to flag when a date is out of
tolerence - hence the request for code.
Thanks though, Patrick
--
Traa Dy Liooar

Jock


"Patrick Molloy" wrote:

use conditional formatting
select columnds D:AD
set the 'cell value is' to 'formula is' and then the formula to

=$AD1-"W" and then set a pattern color
add two more conditions like this for the other two letter patterns

conditional formatting allows three tests, so you got lucky!



"Jock" wrote:

This is a repeat post from yesterday which I'm still struggling with. Gary"s
Student offered some help but:
Sheet uses columns "A-AD", rows 4-10000.
Several sets of adjacent columns are shaded (visually grouped together) to
give clarity for the user.
Here's the premise:
Using a formula in column "AB", either "W", "SD", "ST" or "" will be returned.

I need code to look at column "AB" and colour the row (from "A:AD" only)
red, orange or blue for the first 3 options or leave as is for "".
This part is straightforward ChangeEvent code. However, and this is the bit
I can't fathom, if a cell in "AB" is changed from any of the 3 options back
to blank, the original cell shading needs to be re-applied.
Row 3 is the header row for all the columns, so could the fill colour from
that row be used in the code to correctly re-shade the changed row?
I can email worksheet if req'd.
Thanks
Traa Dy Liooar

Jock

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
shade one cell that will shade multiple cells Walt Excel Discussion (Misc queries) 1 November 17th 09 03:46 PM
VBA CODE SOLVER TO RETURN VALUE Jerry W. Lewis Excel Programming 0 May 28th 08 02:31 AM
Return a value for a known code Bosser Excel Worksheet Functions 1 February 23rd 08 02:21 PM
Return a value for a known code Bosser Excel Worksheet Functions 0 February 23rd 08 10:48 AM
Shade Active Cell - Shade the cell the cursor is in only while in Lisa Excel Programming 2 April 17th 07 10:00 PM


All times are GMT +1. The time now is 04:43 PM.

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"