Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default Name of named formula used in an INDIRECT function

Hello,

I searched this group for an answer, but I couldn't find it.
I would like to use the name of a named formula in the INDIRECT
function,
so I can change the used formula by changing the referenced cell.
For example in Range("A1") I will write the name of the named formula
like "ShiftPattern_1", "ShiftPattern_2" or "ShiftPattern_3".
In the cells, where the formulas are used I'd like to use something
like
"INDIRECT("A1") in order to use the formula which I have put in
Range("A1").
The formula behind the name "ShiftPattern_1" looks like this:
"=IF(AND(ISTEXT(ProdCal.Data!O2),ISERROR(SEARCH("B ridge*",ProdCal.Data!
O2,1))),0,IF(WEEKDAY(ProdCal.Data!L2,2)=PM_Day_7,S hiftsOnPMDay,3))
Some standard formulas and some named ranges like "PM_Day_7" or
"ShiftsOnPMDay".

I hope I've described my problem good enough to get an answer whether
it's possible or not.
Thanks.

Excel XP SP3
WIN XP SP3
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Name of named formula used in an INDIRECT function

"ShiftPattern_1" looks like this:
"=IF(AND(ISTEXT(ProdCal.Data!O2),ISERROR(SEARCH("B ridge*",ProdCal.Data!
O2,1))),0,IF(WEEKDAY(ProdCal.Data!L2,2)=PM_Day_7,S hiftsOnPMDay,3))


ShiftPattern_1 has to resolve to a *text representation of a valid
reference*. The above formula doesn't meet that requirement.


--
Biff
Microsoft Excel MVP


"Werner Rohrmoser" wrote in message
...
Hello,

I searched this group for an answer, but I couldn't find it.
I would like to use the name of a named formula in the INDIRECT
function,
so I can change the used formula by changing the referenced cell.
For example in Range("A1") I will write the name of the named formula
like "ShiftPattern_1", "ShiftPattern_2" or "ShiftPattern_3".
In the cells, where the formulas are used I'd like to use something
like
"INDIRECT("A1") in order to use the formula which I have put in
Range("A1").
The formula behind the name "ShiftPattern_1" looks like this:
"=IF(AND(ISTEXT(ProdCal.Data!O2),ISERROR(SEARCH("B ridge*",ProdCal.Data!
O2,1))),0,IF(WEEKDAY(ProdCal.Data!L2,2)=PM_Day_7,S hiftsOnPMDay,3))
Some standard formulas and some named ranges like "PM_Day_7" or
"ShiftsOnPMDay".

I hope I've described my problem good enough to get an answer whether
it's possible or not.
Thanks.

Excel XP SP3
WIN XP SP3



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 434
Default Name of named formula used in an INDIRECT function

hi, Werner !

instead of using indirect(... function, you could use another defined name using xl4 macro-function evaluate(...)

1) your named-formulae (i.e. ShiftPattern_1) shall return a "formula-text" (i.e. define "the name" using)
="if(and(istext(prodcal.data!o2),iserror(search("" bridge*"",prodcal.data!o2,1))),0,if(weekday(prodca l.data!l2,2)=pm_day_7,shiftsonpmday,3))"

2) "call" the name (i.e.) in cell [A1] =shiftpattern_1
you could format [A1] as blank text or any other (conditional)format as desired/needed

3) create another formula-name (i.e. myFormula) using: =evaluate(!$a$1)+0*now()

4) "call" this last name where you need the resulting evaluation: =myformula

you can "call" another pattern-name in cell [A1] and see the changes where you used =myformula

note: be sure you use this procedure in xl/2002 or above (just in case copying to other worksheets/workbooks)

hth,
hector.

__ OP __
I searched this group for an answer, but I couldn't find it.
I would like to use the name of a named formula in the INDIRECT function,
so I can change the used formula by changing the referenced cell.
For example in Range("A1") I will write the name of the named formula
like "ShiftPattern_1", "ShiftPattern_2" or "ShiftPattern_3".
In the cells, where the formulas are used I'd like to use something like
"INDIRECT("A1") in order to use the formula which I have put in Range("A1").
The formula behind the name "ShiftPattern_1" looks like this:
"=IF(AND(ISTEXT(ProdCal.Data!O2),ISERROR(SEARCH("B ridge*",ProdCal.Data!
O2,1))),0,IF(WEEKDAY(ProdCal.Data!L2,2)=PM_Day_7,S hiftsOnPMDay,3))
Some standard formulas and some named ranges like "PM_Day_7" or "ShiftsOnPMDay".
I hope I've described my problem good enough to get an answer whether it's possible or not.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default Name of named formula used in an INDIRECT function

Thanks, now I don't need to try any more, and that's good to know,
because it's time saving.

Regards
Werner
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default Name of named formula used in an INDIRECT function

Hi Miguel,

thank you for this approach, I'm going to try it.
Some of these "xl4 macro-function" are very useful, would be good to
have them in Excel standard.

Regards
Werner
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Indirect equivalent for named arrays snv Excel Worksheet Functions 1 February 8th 08 04:21 AM
named range in sum formula (indirect, offset, worksheet name) Hans Excel Worksheet Functions 4 February 5th 08 02:14 PM
Using Indirect with Named Ranges Hokievandal Excel Worksheet Functions 4 August 28th 07 08:58 PM
Indirect to Named range Saintsman Excel Worksheet Functions 2 February 28th 07 05:23 PM
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM


All times are GMT +1. The time now is 05:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"