Hi I'm working on a simple worksheet with 6 columns:
A = Buy Price (pre populated)
B = Sell Price (To be input by User or Calculated)
C = Amount (pre populated)
D = Buy Value ( A * C )
E = Sell Value (To be input by User or Calculated)
F = Pecentage (To be input by User or Calculated)
Basically I Want it so that a user will input Either B, E, or F (only one) and the other 2 are then automatically calculated.
So far I have :
This works great for Row 3 but won't work for other rows (rows 3 - xx)
I've tried some options I found through Google ( issue seems to be If Target.Address = )
Any Help Please.
A = Buy Price (pre populated)
B = Sell Price (To be input by User or Calculated)
C = Amount (pre populated)
D = Buy Value ( A * C )
E = Sell Value (To be input by User or Calculated)
F = Pecentage (To be input by User or Calculated)
Basically I Want it so that a user will input Either B, E, or F (only one) and the other 2 are then automatically calculated.
So far I have :
Code:
[INDENT]Private Sub Worksheet_Change(ByVal Target As Range)[/INDENT]
[INDENT]Application.EnableEvents = False[/INDENT]
[INDENT]
[/INDENT]
[INDENT]If Target.Address = "$B$3" Then [E3] = (([B3] * [C3]) / 100)[/INDENT]
[INDENT]If Target.Address = "$B$3" Then [F3] = (([E3] / [D3]) * 100) - 100[/INDENT]
[INDENT]
[/INDENT]
[INDENT]If Target.Address = "$E$3" Then [B3] = ([E3] / [C3]) * 100[/INDENT]
[INDENT]If Target.Address = "$E$3" Then [F3] = (([E3] / [D3]) * 100) - 100[/INDENT]
[INDENT]
[/INDENT]
[INDENT]If Target.Address = "$F$3" Then [B3] = (([F3] / 100) * [A3]) + [A3][/INDENT]
[INDENT]If Target.Address = "$F$3" Then [E3] = (([B3] * [C3]) / 100)[/INDENT]
[INDENT]
[/INDENT]
[INDENT]Application.EnableEvents = True[/INDENT]
[INDENT]End Sub[/INDENT]
I've tried some options I found through Google ( issue seems to be If Target.Address = )
Any Help Please.