View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default Relative cell value in function

I think you might need to run the function to determine the value, I presume
you mean before it is applied to the cell. Without seeing the function, you
could assign to a variable then evaluate that, then update cell ... maybe?

Pseudo code.......

dim myResult variable
myResult = myFunction(myParameters)
etc...
if OK then myCell = myResult

The cell to the left is ActiveCell.Offset(0,-1).Value or =OFFSET(A2,0-1)
returns value in A1

--

Regards,
Nigel




"Humphrey" wrote in message
...
I have a large spreadsheet the uses a function to calculate the cell value.
I have two questions;
* is it possible to determine the value in the cell before the function is
run?
* is it possible to determine the value in the cell immediately to the
left?

I've tried using ActiveCell.Offset but the result is always coming back as
Empty. Any thoughts?

H