Thread: Reusing formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Arvi Laanemets Arvi Laanemets is offline
external usenet poster
 
Posts: 510
Default Reusing formula

Hi

Define a named formula, so that its returned value depends on address of
cell, it is called from. An example:
Create a named formual (InsertNameDefine)
MyFormula=ROW()*Sheet1!$A$1+COLUMN()*Sheet1!$B$1;
Into range A1:B1 on Sheet1, enter some values;
In any sheet, into some cell enter the formula
=MyFormula
Copy the cell with this formula to some range - you get some values;
Now change your named formula definition to
=POWER(ROW(),Sheet1!$A$1)+POWER(COLUMN(),Sheet1!$B $1)
All return values for formula =MyFormula do change at once.

Another option is to write an UDF, but I'm not sure it'll be possible.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"Tony29" wrote in message
...
I know you can "reuse" a formula by copy/paste to a new cell and the
relative/absolute characteristics of the formula will be preserved. BUt
this
means that if the formula needs to change then I have to look for all
places
to which it was previously copied and carry out the copy/paste again -
tedious and error prone.

I want to enter a formula once only (eg. in the column heading above where
the formula will be used). Somewhere else in the sheet I want to say "use
the formula provided in cell R,C" and adopt the relative and absolute
references inherent in that formula.

For example ... =USE($H$1) would be a nice function

Can this be done?

An extension of this would be to reuse not only the formula of the
referred
cell, but to also reuse some other characteristics of the referred cell

For example ... =USE($H$1,"format"&"conditional format")

Can this be done?