Discussion Locked

Excel

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have created a named varible called race6first
which I can input in result!$B$28.
I would like to refer to this named varible
in a formula created by varying the numeric 6 or any numeric no. Example: race6first is being input as 10 in a formulacell f32
="race"&trim(a32)&first*17
if
"race"&trim(a32)&first returns 10
then
f32=170
endif

my question ???
how to make "race"&trim(a32)&first return 10 ?????
instead of the textstring race6first

5 replies

by dklippert

I think your looking for Indirect. As in:
=IF(INDIRECT("Race"&TRIM(A32)&"first")=10,"Yes","No")

by richtee

To the best of my knowledge you cannot use concatenation to return a defined named value. (Unless you do a long way of copy | paste special and then insert an = sign. This could be done with VB for a single cell but quite complex to be used as a variable).

I can offer a suggestion that you look into the use of using Natural Language Formulas. There is a very specific MS KB article on it. The article is Q279412

This might give you an alternative way of processing your variables in formulas.
Rich

This discussion is closed to new replies.