Visual basic Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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




message
news:[email protected]...
 
Glenn,

select the rows in question (let's assume it starts in row 1)
goto Format>Conditional 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)
 
Back
Top