thank you.
my target cell is A1 which changes.
what I want to find is:
I am changing the values in A1. I want to find out how many times I have
entered 1000 in A1. I do not want B2 to increment if I enter 1000 in any
other cell.

I hope I made myself clear.

I am also intrgiued by the no. 222 and whenever I enter 1000 in A1, B2
increments by 222.



"Jim Cone" <jim.coneXXX@rcn.comXXX> wrote in message
news:eoQruK1vGHA.4880@TK2MSFTNGP04.phx.gbl...
> "Target" is the cell that has been changed.
> Things can cascade on you if you change a cell value in your code.
> That causes your code to run again which changes a cell value which makes
> your code run again and so on...
> What are you trying to do?
> --
> Jim Cone
> San Francisco, USA
> http://www.realezsites.com/bus/primitivesoftware
>
>
> "R..VENKATARAMAN"
> <$$$$venkat1926@$$$yahoo.com>
> wrote in message
> I intitialise B2 as 0(zero)
> then my event code is like this
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> Set Target = Range("a1")
> If Target = 1000 Then Range("B2") = Range("B2") + 1
> End Sub
>
> now if I type 1 B2 remains 0
> then If type 1000 B2 become 222
> what is this 222?
>
> I changed the event code by removing the line
> set target=range("a1")
> then it is ok i.e. whenever 1000 is entered in A1, B2 increments by 1.
> but the snag is if I change some other cell to 1000 then also B2
> increments
> by anoher 1.
>
> some elucidation will be helpful. I agree there is some confusion in my
> mind reg worksheet change code and also the impliatin of term "target"
>
> Kind regards.
>
> excel 2002/XP
>
>