On cell change - run macro
Posted by Artem on April 09, 2001 11:01 AM
hello,
sorry for bugging you guys with frequent requests, but if you don't mind a short question:
i have a disjoint range of data named "Revenues". Those revenues are usually in foreign currency, so i also have a cell named "FX" which has an exchange rate. Whenever the "FX" cell is changed, i want the new values in range "Revenue" to be their old values times "FX" value (basically converting all numbers from one currency to another). unfortunately, i don't know how to make Excel store old values. PLEASE HELP!!! i know this problem can be solved with a simple formula, but that's not exacly applicable in my case). below is my non-working macro in case you need it.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
OldValue = Range("Revenues").Value
If Target.Address = "FX" Then
Range("Revenues").Value = OldValue * Range("FX").Value
End Sub