Comparing Two Ranges to Strikethrough Text in a Cell, in One Range to Match a different Cell In Another Range

danjris

New Member
Joined
Jun 25, 2015
Messages
11
Hello wonderfully smart people!

Can someone help or point me in the right direction...

I would like to have a list of tasks, say A2:D15 would be a list of things to do. Then F:J would be days of the week. So, for example, A2 is "Inventory Parts" and H7 is "Inventory Parts". As H7 is filled the text in A2 would become strikethrough. Ideally the 4 columns for "things to do" would be called "Tasks" and F:J would be named "Completed"

Hopefully that makes sense.

Thanks so much!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Using those two named Ranges.
Tasks and Completed

Try this:

This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window

Now when you enter a value in Range Completed if that same value is found in Range Tasks that value in range tasks will have strike through

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Modified  11/14/2018  9:16:18 PM  EST
If Not Intersect(Target, Range("Completed")) Is Nothing Then
If Target.Cells.CountLarge > 1 Or IsEmpty(Target) Then Exit Sub
Dim ans As String
ans = Target.Value
Set SearchRange = Range("Tasks").Find(ans)
If SearchRange Is Nothing Then MsgBox ans & "  Not Found": Exit Sub
SearchRange.Font.Strikethrough = True
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top