View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Getting the cell formula

Thanks for the feedback, Daiv....I'm glad you could use that.

***********
Regards,
Ron

XL2002, WinXP


"Daiv" wrote:

I got rid of the vlookup and used your Idea for defining the formulas. I
then used a series of IF's to determine the formula to use.

I was thinking the data validation list might be more efficient and easier
to update (adding/deleting options) but this will work too.

Thanks for the idea!!

"Ron Coderre" wrote:

Based on what you've posted, if you only need a few formulas, I think you may
be able to use "named formulas".

Try this example:

Select cell C1 on Sheet1

From the Excel main menu:
<insert<name<define
Names in workbook: MyFormula_1
Refers to: =Sheet1!A1*Sheet1!B1
Click the [ADD] button

Names in workbook: MyFormula_2
Refers to: =Sheet1!A1+Sheet1!B1
Click the [ADD] button
Click the [OK] button

(Note that the above references are relative, NOT absolute))

A1: 10
B1: 20
C1: =IF(A1<=50,MyFormula_1,MyFormula_2)

MyFormula_1 will be used.
Change A1 to 51 and MyFormula_2 will be used.

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Daiv" wrote:

How do I reference the formula of a cell to apply it to other cells, and not
the resulting value of the cell?

I am using VLOOKUP so far but am missing this one peice of the puzzle. The
formula will also need to reference other cells relative to the initial cell
it is stored in.

Thanks.