View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Need to determine the ROW of the TARGET in a Worksheet Change

Target is the changed range object:

If Target.Cells.Count 1 Then
Msgbox "More than one cell!"
Exit Sub
End If
myRow = Target.Row
MsgBox "The changed cell was cell " & Target.Address & ", which is row " & myRow


--
HTH,
Bernie
MS Excel MVP


"Barb Reinhardt" wrote in message
...
I'm not sure I made myself clear. I could change a cell anywhere between
D13 and D100 (for example) and I want to know what row # the cell was in.
If I change D20, I want 20 returned. How do I do that?

"Don Guillett" wrote:

how about
if target.address="$A$1" then

--
Don Guillett
SalesAid Software

"Barb Reinhardt" wrote in message
...
How do I determine what row number the TARGET is located in for a
WORKSHEET_Change event. My target MUST be one cell or this piece of the
code won't work.

Can someone assist?

Thanks,
Barb Reinhardt