|Here's a little tip when requesting help in a forum such as this:|
Now don't take this the wrong way, but we often get questions in this forum where requirements come in drips and draps.
"I need a macro to this"
"Thanks, now can you make it do this too?"
"Hey, that's great. Now, how do I add this?"
That gets a bit annoying since we have to go back and modify the code, sometimes even rewriting it completely so we don't end up with inefficient, cobbled together code.
In addition, we (well, at least I) don't save every workbook that we set up to test our code. When additional requirements come along later, we (I) usually have to copy the code from the forum, set up the workbook with data in the correct columns, etc.
Since I don't want to just add lines to code without testing it, I have to go through extra (repeated) work to test it.
Think about managing a project and asking someone to quote on it or even implement it. Once you start adding requirements after the initial work has begun, things get messy - and usually more expensive.
That said, try this modified version of the code - and keep in mind that I just went through all of the extra steps I detailed above to make sure it works.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim targetRange As Range, selectedRange As Range, col As Range
Set targetRange = Range("C145:V164")
Set selectedRange = Intersect(targetRange, Target.Cells(1))
If selectedRange Is Nothing Then _
If selectedRange.Cells(1) = "*" Then
selectedRange.Cells(1) = ""
For Each col In selectedRange.Cells(1).EntireColumn
selectedRange.Cells(1) = "*"