Strike through when entering date [Solved]

Ask a question Bill - Latest answer on Jan 2, 2016 12:47AM
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.
See more 
moins plus
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!

Add comment
moins plus
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 11:24PM
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.

Add comment

Members get more answers than anonymous users.

Being a member gives you detailed monitoring of your requests.

Being a member gives you additional options.

Not a member yet?

sign-up, it takes less than a minute and it's free!