Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use Application.caller to return a range reference to the cell that
contains the function, but you cannot get its value in any straightforward way. One possible way is to use Application.Caller.Text, but that returns the formatted value rather than the actual value (could return ###### for instance) so is very dependent on the user formatting etc. To get the cell one to the left you could use OFFSET(application.caller,-1,0,1,1) but this would require you to make the function volatile (Application.Volatile), which could slow down recalculation. A better way would be to pass the cell to the left as a parameter to the function. You can use ISEMPTY() to determine if an input parameter has not yet been calculated. Charles __________________________________________________ Outlines for my Sessions at the Australia Excel Users Group http://www.decisionmodels.com/OZEUC.htm "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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Relative VBA function | Excel Programming | |||
Relative addressing with INDIRECT function | Excel Programming | |||
Split function to get a relative path | Excel Programming | |||
Get Relative Data from result of MIN function | Excel Programming | |||
Indirect function - relative reference | Excel Programming |