How do I Give Text a Value

A

AndyCAK

how can I give text a value?

example:

How can I have the text display ANC-DNP

and have excel interpret this as 12.5

Help anybody?
 
R

RagDyer

For some reason ANC-DNP is on the reserved list.

Could you use ANC_DNP?

If yes, try,
<Insert> <Name> <Define>,

In the "Names In Workbook" box, enter
anc_dnp (*not* case sensitive)

And in the "Refers To" box,
*Replace* whatever's there with
=12.5
Then <OK>

Now, in an empty cell, enter
=anc_dnp
And you'll get a return of
12.5

Try,
=2*anc_dnp
And you'll get a return of
25

You can use anc_dnp in any formula, exactly as if it were a number.

=IF(A1>ANC_DNP,A1-ANC_DNP,A1+ANC_DNP)

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
C

CLR

As long as your text "vocabulary" isn't too extensive, the VLOOKUP feature
might do what you want............

Vaya con Dios,
Chuck, CABGx3
 
R

RagDyer

You're right, and I think I knew that, but it sure didn't come out sounding
like I did ... did it?<vbg>

To AndyCAK,
What I suggested here is called "Named Formulas",
And as such (formulas), that 12.5 value can be easily revised if need be, by
referencing a cell, instead of "hard coding" it in the formula.
In the "Refers To" box, simply enter an *absolute* cell address:
=$A$1

Carrying it a step further, you could enter *any* type of formula that
returns a value, and ANC_DNP will attain that value:

=$A$1+$B$1

=IF($A$1<>$B$1,$C$1,10.75)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top