ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional formatting or ...?? (https://www.excelbanter.com/excel-programming/355675-conditional-formatting.html)

Brian Clarke[_3_]

Conditional formatting or ...??
 
I have a simple worksheet of jobs I need to do. Just 3 columns, and when I
put a date in column 3 I would like the row to be hidden immediately
(because the job is finished).

Any suggestions would be appreciated.




Carim[_3_]

Conditional formatting or ...??
 
Hi Brian,

You could adapt something along these lines :

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
Set Target = Range("C2:C20")
If Target Is Nothing Then
Exit Sub
Else
For Each Cell In Target
If Cell.Value < "" Then
Cell.Offset(0, 0).EntireRow.Hidden = True
End If
Next Cell
End If
End Sub

HTH
Cheers
Carim


GS

Conditional formatting or ...??
 
Hi Brian,

Something like this should do what you want:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then
If IsDate(Target.Value) Then Target.EntireRow.Hidden = True
End If
End Sub

Regards,
GS


All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com