Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing a Parameter Of A Formula
Hi,
I would be grateful if someone could help me with the problem have got. I have written a macro, with my user defined functions. One of my user defined functions is called GetData and it has two parameters Reference and Last_Value, eg GetData(Reference, Last_Value). I call GetData by assigning this to a cell like so (which works fine): Cell.Formula = GetData(Reference, Last_Value) Now within the GetData function I use the Reference Parameter to get a New Value, which will be returned to the cell (which works fine too). But what I wanted to know is how can I change the Last_Value Parameter to the new Value I have, which also change Last_Value which is assigned to cell while I'm still in the GetData function. Thanks Sunnous |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing a Parameter Of A Formula
A user defined function cannot change other cells in the workbook.
You might want to hook the Calculate event or onchange for the reference cell. -- Rob van Gelder - http://www.vangelder.co.nz/excel "Sunnous" wrote in message ... Hi, I would be grateful if someone could help me with the problem have got. I have written a macro, with my user defined functions. One of my user defined functions is called GetData and it has two parameters Reference and Last_Value, eg GetData(Reference, Last_Value). I call GetData by assigning this to a cell like so (which works fine): Cell.Formula = GetData(Reference, Last_Value) Now within the GetData function I use the Reference Parameter to get a New Value, which will be returned to the cell (which works fine too). But what I wanted to know is how can I change the Last_Value Parameter to the new Value I have, which also change Last_Value which is assigned to cell while I'm still in the GetData function. Thanks Sunnous |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with parameter substitution in formula (&value), vbScript | Excel Worksheet Functions | |||
How to choose if I use a parameter or not in a parameter query | Excel Discussion (Misc queries) | |||
Replaceable parameter in formula | Excel Worksheet Functions | |||
Changing a Parameter Of A Formula | Excel Worksheet Functions | |||
Changing a Parameter Of A Formula | Excel Worksheet Functions |