Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Visual basic Code

Hi,

I have a spreadsheet with a list of cases in rows. Coloumn D lieterally has
a letter B or R, basically I would like some code that if coloumn D says R
then that row is displayed in red if coloumn D says B then the row is
displayed in blue.

Is this possible
Many Thanks
Glenn Robertson
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Visual basic Code

You can use Conditional Formatting from the Format menu to do
this. Select the cells in columns D and open the Conditional
Formatting dialog, change "Cell Value Is" to "Formula Is" and
enter the following formula:

=D1="R"

Click the Format button and choose a Red format. Then click the
Add button to create a new format condition, and change "Cell
Value Is" to "Formula Is" and use the following formula:

=D1="B"

Click the Format button and choose a Blue format.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"GRobertson" wrote in
message
...
Hi,

I have a spreadsheet with a list of cases in rows. Coloumn D
lieterally has
a letter B or R, basically I would like some code that if
coloumn D says R
then that row is displayed in red if coloumn D says B then the
row is
displayed in blue.

Is this possible
Many Thanks
Glenn Robertson



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Visual basic Code

Glenn,

select the rows in question (let's assume it starts in row 1)
goto FormatConditional Formatting
change condition to Formula Is
add a formula of =$D1="R" (the start row)
select the pattern tab, and choose red
OK
Add condition
same procedure with a formula of =$D1="B"
OK out

--

HTH

RP
(remove nothere from the email address if mailing direct)


"GRobertson" wrote in message
...
Hi,

I have a spreadsheet with a list of cases in rows. Coloumn D lieterally

has
a letter B or R, basically I would like some code that if coloumn D says R
then that row is displayed in red if coloumn D says B then the row is
displayed in blue.

Is this possible
Many Thanks
Glenn Robertson



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
Visual Basic code Pickle Excel Discussion (Misc queries) 1 September 4th 08 03:35 PM
I need a visual basic code....please Rhonda Excel Discussion (Misc queries) 1 March 5th 07 01:18 PM
visual basic code Whitey Excel Programming 1 October 26th 04 04:05 PM
Control box help - visual basic code jontait Excel Programming 2 March 4th 04 03:20 PM
Visual Basic Code Robert Couchman Excel Programming 2 February 2nd 04 03:10 PM


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