Coloring a row a different color upon completing a cell

M

M Hill

HI guys, dont know where to start here.

I have 4 columns

Date Task Details Completed

What I would like to do is:
If I enter the letter 'y' in the Completed cell,
then the whole row changes color.

Any help greatly appreciated.


--


---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
 
J

J.E. McGimpsey

Check out Conditional Formatting in XL Help.

one way:

Select the row(s) - say row 2 has the active cell

Choose Format/Conditional Formatting and change the dropdowns and
Textboxes to read

Formula is =(LOWER($D2)="y")

Click Format and choose a color from the patterns tab. click OK, OK.
 
M

M Hill

Thanks J.E, appreciate your help, thank you.

--


---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
 
M

M Hill

Hi J.E,

To take this one step further,

When rows are marked in a different color,
is there a way to move these rows to an existing worksheet, and just append
them to the worksheet?


--


---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
 
J

J.E. McGimpsey

You can't access the CF color, but you can use the same formula in a
macro:

Public Sub MoveRowsWithYinColumnD()
Dim rDest As Range
Dim rSource As Range
Dim rCell As Range

Set rDest = Sheets("Sheet2").Range("A" & _
Rows.Count).End(xlUp).Offset(1, 0)
With Sheets("Sheet1")
For Each rCell In .Range("D1:D" & _
.Range("D" & Rows.Count).End(xlUp).Row)
If LCase(rCell.Value) = "y" Then
If rSource Is Nothing Then
Set rSource = rCell
Else
Set rSource = Union(rSource, rCell)
End If
End If
Next rCell
End With
If Not rSource Is Nothing Then
With rSource.EntireRow
.Copy rDest
.Delete
End With
End If
End Sub
 

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