S
S Kutter
Hello,
I am wondering if excel offers the possibility of something like a
local variable. For example:
Task: check whether the cell A1 contains a number;
if yes, print this number
if no, print "no number".
The standard anwer
=IF(ISNUMBER(A1);A1;"no number")
Now, I would like to do something like (I have invented the function):
=MODULE{VAR1=A1; IF(ISNUMBER(VAR1);VAR1;"no number")}
Okay, here, this does not make sense as there is a simple standard
solution. But just imagine VAR1 has a very complicated form (like a
lookup). Using something like MODULE{} would 1) make things neater and
2) presumably faster as the program would not neet to do the
complicated computation twice.
Could anybody help? Would anybody know the correct syntax if it
exists?
Thanks
Samuel Kutter
I am wondering if excel offers the possibility of something like a
local variable. For example:
Task: check whether the cell A1 contains a number;
if yes, print this number
if no, print "no number".
The standard anwer
=IF(ISNUMBER(A1);A1;"no number")
Now, I would like to do something like (I have invented the function):
=MODULE{VAR1=A1; IF(ISNUMBER(VAR1);VAR1;"no number")}
Okay, here, this does not make sense as there is a simple standard
solution. But just imagine VAR1 has a very complicated form (like a
lookup). Using something like MODULE{} would 1) make things neater and
2) presumably faster as the program would not neet to do the
complicated computation twice.
Could anybody help? Would anybody know the correct syntax if it
exists?
Thanks
Samuel Kutter