close

My formula currently looks like this

=if(or(A=Green,A=Yellow,A=Red),1,0)

unfortunately A is a fairly long formula. Is there a more elegant way to do
this?

Thanks,
Barb Reinhardt

Hi Barb,

I don't know the restrictions you might have, but if possible I would always store the A formula in a cell and use that address to
compare.

--
Kind regards,

Niek Otten

quot;Barb Reinhardtquot; gt; wrote in message
...
| My formula currently looks like this
|
| =if(or(A=Green,A=Yellow,A=Red),1,0)
|
| unfortunately A is a fairly long formula. Is there a more elegant way to do
| this?
|
| Thanks,
| Barb Reinhardt
Hi Barb..........
Maybe just put the long formula in a helper cell and refer to that cell in
your IF statement..........

hth
Vaya con Dios,
Chuck, CABGx3
quot;Barb Reinhardtquot; wrote:

gt; My formula currently looks like this
gt;
gt; =if(or(A=Green,A=Yellow,A=Red),1,0)
gt;
gt; unfortunately A is a fairly long formula. Is there a more elegant way to do
gt; this?
gt;
gt; Thanks,
gt; Barb Reinhardt

I thought about that, but would prefer not to as I already have a lot in this
worksheet.

Thanks for your help.

quot;Niek Ottenquot; wrote:

gt; Hi Barb,
gt;
gt; I don't know the restrictions you might have, but if possible I would always store the A formula in a cell and use that address to
gt; compare.
gt;
gt; --
gt; Kind regards,
gt;
gt; Niek Otten
gt;
gt; quot;Barb Reinhardtquot; gt; wrote in message
gt; ...
gt; | My formula currently looks like this
gt; |
gt; | =if(or(A=Green,A=Yellow,A=Red),1,0)
gt; |
gt; | unfortunately A is a fairly long formula. Is there a more elegant way to do
gt; | this?
gt; |
gt; | Thanks,
gt; | Barb Reinhardt
gt;
gt;
gt;

Hi Barb,

Consider a defined name for your formula.--
Kind regards,

Niek Otten

quot;Barb Reinhardtquot; gt; wrote in message
...
|I thought about that, but would prefer not to as I already have a lot in this
| worksheet.
|
| Thanks for your help.
|
| quot;Niek Ottenquot; wrote:
|
| gt; Hi Barb,
| gt;
| gt; I don't know the restrictions you might have, but if possible I would always store the A formula in a cell and use that
address to
| gt; compare.
| gt;
| gt; --
| gt; Kind regards,
| gt;
| gt; Niek Otten
| gt;
| gt; quot;Barb Reinhardtquot; gt; wrote in message
| gt; ...
| gt; | My formula currently looks like this
| gt; |
| gt; | =if(or(A=Green,A=Yellow,A=Red),1,0)
| gt; |
| gt; | unfortunately A is a fairly long formula. Is there a more elegant way to do
| gt; | this?
| gt; |
| gt; | Thanks,
| gt; | Barb Reinhardt
| gt;
| gt;
| gt;
Try something like this:

Define this Named Range:
Name: LU_TrafficLights
Refers to: ={quot;Greenquot;,quot;Yellowquot;,quot;Redquot;}

Now, for a value in A1
B1: =IF(OR(A1=LU_TrafficLights),1,0)

Is that something you can work with?

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

XL2002, WinXP-Proquot;Barb Reinhardtquot; wrote:

gt; My formula currently looks like this
gt;
gt; =if(or(A=Green,A=Yellow,A=Red),1,0)
gt;
gt; unfortunately A is a fairly long formula. Is there a more elegant way to do
gt; this?
gt;
gt; Thanks,
gt; Barb Reinhardt

You could create a separate worksheet for this, and give the one cell you need a defined name.
It's very likely that you can't even notice the difference in performance and memory usage, and it makes it easier to keep control
of your total workbook.

--
Kind regards,

Niek Otten

quot;Barb Reinhardtquot; gt; wrote in message
...
|I thought about that, but would prefer not to as I already have a lot in this
| worksheet.
|
| Thanks for your help.
|
| quot;Niek Ottenquot; wrote:
|
| gt; Hi Barb,
| gt;
| gt; I don't know the restrictions you might have, but if possible I would always store the A formula in a cell and use that
address to
| gt; compare.
| gt;
| gt; --
| gt; Kind regards,
| gt;
| gt; Niek Otten
| gt;
| gt; quot;Barb Reinhardtquot; gt; wrote in message
| gt; ...
| gt; | My formula currently looks like this
| gt; |
| gt; | =if(or(A=Green,A=Yellow,A=Red),1,0)
| gt; |
| gt; | unfortunately A is a fairly long formula. Is there a more elegant way to do
| gt; | this?
| gt; |
| gt; | Thanks,
| gt; | Barb Reinhardt
| gt;
| gt;
| gt;
=ISNUMBER(MATCH(A,{quot;Greenquot;,quot;Yellowquot;,quot;Redquot;},0)) 0

Barb Reinhardt wrote:
gt; My formula currently looks like this
gt;
gt; =if(or(A=Green,A=Yellow,A=Red),1,0)
gt;
gt; unfortunately A is a fairly long formula. Is there a more elegant way to do
gt; this?
gt;
gt; Thanks,
gt; Barb Reinhardt

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()