tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,924
- Office Version
- 365
- 2019
- Platform
- Windows
Further to this thread of mine:
I have the following in Module1:
In Sheet2 cell B2, I type:
In Sheet1 cell A1, I have a value of 1.
Sheet2 cell B2 has the correct value of 30.
What I find strange is if I change the value in Sheet1 Cell A1, the code is triggered off.
For example if I change the value from 1 to 2, the code starts BUT if I simply press F2 in Sheet1 cell A1, the cell isn't triggered.
So my question is:
1. Why is the code triggered at all when I change the value in Sheet1 cell A1.
2. Why doesn't it change when I simply press F2?
Thanks
Rich (BB code):
I have the following in Module1:
Rich (BB code):
Option Explicit
Function MyFn(firstval As Double, val As Double) As Double
If firstval = 1 Then
MyFn = val + 10
Else
MyFn = val + 20
End If
End Function
In Sheet2 cell B2, I type:
Rich (BB code):
=myfn(Sheet1!A1, 10)
In Sheet1 cell A1, I have a value of 1.
Sheet2 cell B2 has the correct value of 30.
What I find strange is if I change the value in Sheet1 Cell A1, the code is triggered off.
For example if I change the value from 1 to 2, the code starts BUT if I simply press F2 in Sheet1 cell A1, the cell isn't triggered.
So my question is:
1. Why is the code triggered at all when I change the value in Sheet1 cell A1.
2. Why doesn't it change when I simply press F2?
Thanks
Last edited: