View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_355_] Leith Ross[_355_] is offline
external usenet poster
 
Posts: 1
Default If a cell does not contain a formula then...


Hello Matt,

You need to use the SelectionChange event of the Worksheet to test th
cell the user has selected. Each worksheet has it's own events so, i
you plan to use this on multiple worksheets, you must include this cod
on each one.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim R As Long

R = Target.Row

If Target.Column = 1 Then
If Target.HasFormula = True Then
Cells(R, "D").Value = "Y"
Else
Cells(R, "D").Value = "N"
End If
End If

End Sub


Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=49202