Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Circular reference

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Circular reference

You can only replace the cell contents with a macro. You could create a
formula in another cell to evaluate to the desired value.

steve

p.s.
Please reply to the sent messages so that each message contains all the
previous messages. Otherwise it is difficult to follow the train.

"Chee-wooi Ten" wrote in message
...
Can it be done without writing a macro?

Regards,
cw

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Circular reference help Alexey[_3_] Excel Discussion (Misc queries) 3 September 19th 08 03:26 PM
Circular reference april Excel Discussion (Misc queries) 3 September 16th 07 06:26 PM
Circular Reference nastech Excel Discussion (Misc queries) 1 April 27th 06 12:54 AM
Circular reference help please! [email protected] Excel Discussion (Misc queries) 1 February 9th 06 10:41 AM
circular reference when using a UDF Saira Excel Worksheet Functions 1 September 21st 05 06:39 PM


All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"