Strike through when entering date [Solved/Closed]

Ask a question Bill - Last answered on Jan 2, 2016 at 12:47 AM by vcoolio
In excel I have a row of information in six different cells. The first cell and last cell have a date format. When I enter the last date to the far right I want the whole row to show a strike through each and every cell. I can still read it but it will show me the item is closed. Any help you can give me would be greatly appreciated.

plus moins
Hello Bill,

A Guru I most certainly am not but I am glad that I could help.

Good luck with it all and Happy New Year!

Was this answer helpful?  
plus moins
Hello Bill,

Perhaps the following code should do the task for you:-

Private Sub Worksheet_Change(ByVal Target As Range)

Application.ScreenUpdating = False
Application.EnableEvents = False

Dim lRow As Long
lRow = Range("A" & Rows.Count).End(xlUp).Row

For Each cell In Range("F2:F" & lRow)
     If cell.Value <> "" Then
     cell.EntireRow.Font.Strikethrough = True
     cell.EntireRow.Font.Strikethrough = False
     End If

Application.EnableEvents = True
Application.ScreenUpdating = True

End Sub

The code is a Worksheet_Change event which means it needs to be placed in the work sheet module. To do this, right click on the sheet tab, select "view code" and in the big white field that appears, paste the above code.

Go back to your work sheet. Each time that you enter a date in a cell in Column F, a strikethrough will appear across the row of data.

Please test the code in a copy of your work book first.

Following is a link to my test work book which shows you how it all works:-

I hope that this helps.

Bill- Jan 1, 2016 at 11:24 PM
Hello Vcoolio,
You my friend are the Guru of program writing, Thank you so very much. I was racking my brain out trying to figure out how to solve this problem. I am so happy I found this site with CCM. Thanks again, you are the greatest.


Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!