View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
steve steve is offline
external usenet poster
 
Posts: 576
Default Circular reference

If you are saying that a value is entered into B1 and than you want the
program to lookup a new value for B1.

Use a Worksheet_Change event. Be sure to put the code in the sheet module
(not a standard module).

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim x
' I am not defining the type of variable because I don't know what you
' are using. Also it allows you to use mixed types.

x = Target.Value ' remove .Value if you have an error
Target.Value = Vlookup(x,"Your Table",2)
' I am assuming a 2 column table

End Sub

steve
Note: code not tested...

"Chee-wooi Ten" wrote in message
...
I am looking for something that the value to refer its
own. Say B1 originally with the value of 20. Now I want to
use the lookup table to find out the 20 that is "abc" that
write back to its own cell. Is this something possible?

Chee-wooi