View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Retrieve individual cells from a range changed between a range

Hi Baldomero,

Try something like:

'========================
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range

Set rng = Range("B1:B5")

If Not Intersect(Target, rng) Is Nothing Then
'Do something, e.g.:
MsgBox Target.Address
Else
'Do nothing
End If

End Sub
'<<========================

---
Regards,
Norman



"baldomero" wrote
in message ...

Hi. What I would like to do is retrieve the cells, using the
Worksheet_Change Event.

The question is that I only want to retrieve those cells that are from
a determined range I want to work(B1:E5 for example)

I do a:

*For Each Range In Range(Target.Address)*, the problem is that this
returns every cell changed on the Worksheet, but I don't know how to
determine if the cells are on the B1:E5 range. Any help?

EDIT:: In other words, what I need to do is something like:

Is this single cell part of this range?
Is Cells(3, 3) into Range("B1:B5")?


--
baldomero
------------------------------------------------------------------------
baldomero's Profile:
http://www.excelforum.com/member.php...o&userid=25680
View this thread: http://www.excelforum.com/showthread...hreadid=401820