First enter your three initial values
Then copy this small macro to worksheet code:
Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Range(quot;B1:C1quot;), Target) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Intersect(Range(quot;B1quot;), Target) Is Nothing Then
Range(quot;B1quot;).Value = Range(quot;A1quot;).Value * Range(quot;C1quot;).Value
Else
Range(quot;C1quot;).Value = Range(quot;B1quot;).Value / Range(quot;A1quot;).Value
End If
Application.EnableEvents = True
End Sub
If you change B1, then C1 will automatically update.
If you change C1, then B1 will automatically update.
If you change A1, then nothing will automatically update.
--
Gary's Studentquot;Abhiquot; wrote:
gt; gt; I have a formula with circular reference. When a I put any valur in
gt; gt; any of these reference cells the formaula gets overwritten by the
gt; gt; value. Is there any way that I can put values in any of these cells
gt; gt; without overwriting the formuls to try various permutations. Below is
gt; gt; the example:-
gt; gt;
gt; gt; Cell A B C
gt; gt; 500 10 2%
gt; gt; Formula C1*A1 B1/A1
gt; gt;
gt; gt; Cell B1 amp; C1 are having formula with cicular reference. What I am
gt; gt; trying to get is that if I change the B1 value to 50 from 10, then C1
gt; gt; should automatically change to 10% amp; vice versa. OR If C1 is changed
gt; gt; to 10% B1 should change to 50 so that I can try as many combinationas
gt; gt; possible.
gt; gt;
gt; gt; The problem here is that once i put quot;50quot; in B1 or quot;10%quot; in C1 the
gt; gt; formula gets overwritten with the absolute value.
gt; gt;
gt; gt; Would be thank ful if anybody can suggest any solution for this?
gt; gt;
gt; gt; Regards
gt; gt; Abhi
gt;
- Feb 22 Thu 2007 20:35
HTH
close
全站熱搜
留言列表
發表留言