conditional formatting

G

Guest

I am trying to use conditional formatting to make an entire row red if the
content of column B for that row has the word "Exception" in it. I only
succeeded in conditionally formatting that particular cell. How can I get the
formatting to apply to the entire row, when the cell in column B of that row
contains the word "Exception"?
 
P

Pete_UK

Suppose you are doing this on row 2. Highlight the whole row by
clicking on the row identifier, then Format | Conditional Formatting.
Select Formula Is rather than Cell Value Is and enter this fomula:

=$B2="Exception"

then click on the Format button and choose your effect. OK your way
out.

If you want to apply the format to other rows, use the Format Painter
icon.

Hope this helps.

Pete
 
G

Guest

Within the Conditional Format window, choose "Formula Is" and type in the
following.

=AND($B1<>"",$B1="Exception")
then set your format.

To paste to the remaining cells, you will need to make three separate paste.
After entering and closing conditional formatting window, click on cell B1,
then click on the paint brush and then click on cell A1. To paste to the
right of cell B1, click on cell B1 again, click paint brush, then click on C1
and hold mouse button down (usually the left button) and roll to the end of
the row, highlighting just the cells that are to be affected.

The next paste will cover all rows below row one. Again, click on cell B1,
click the paint brush, then click on A2 (holding down the mouse button -
usually left button) and roll to the end of the row (however many cells are
affected in row), then roll down to highlight all the rows. Then release the
button.

Les
 
S

Sandy Mann

As others have implied ,Conditional formatting applies to only the
one cell so either you have to pu it in every cell or use Even Code in the
Sheet Module. Something like:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Target, Columns("B")) Is Nothing Then Exit Sub

E = InStr(1, Target.Value, "Exception", 1)
If E <> 0 Then
Target.EntireRow.Interior.ColorIndex = 3
End If
End Sub


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top