computed named cell references

W

Wehrmacher

I have a need for a look-up table function in Excel. The look-up functions
are combersome for my particular application.

I can create a table, for example prices, with several named rows and
columns. I need to find values in the table based on imported data which
contains elements which would define which row and column a value would be
returned. For example, if my price table has prices for red, blue, and yellow
balls, of ten, twelve, and fifteen inch diameters and my input data is a
contains two columns that contain the color and diameter pairs, I would like
to use the values in the columns to fabricate a "=blue twelve" like command
that would extract the appropriate price from a table with those named
ranges.

Thus far I have been forced to concatenate the values in the input data
columns with the appropriate equal sign and space for each of the rows, copy
the result to a word document, copy the word document content and paste it
back into the spreadsheet. Excel thinks I have typed in that content and
happily finds the prices. although it is a horrible thing to do 50 times a
month with different input data with thousands of rows. It seems that since
Excel has the "=RowName ColumnName" function, one should be able to compute
the commands on the fly.

Any ideas on this? I expect this is really a database function, but we
would like to accomplish it in Excel if possible.

Thanks
 
W

Wehrmacher

Thank T.

I am using Excel 2003. I am aware of the accept labels in formulas, however
in this case I want to use the content of two cells to become the labels to
recover the data in my table. However, I will review that option some more
to see if it has more to it than I thought.
 
M

Max

One way

Place in C10:
=IF(COUNTA(A10:B10)<>2,"",INDEX($B$2:$D$4,MATCH(A10,$A$2:$A$4,0),MATCH(B10,$B$1:$D$1,0)))
Copy down
 
T

T. Valko

You do not need "Accept labels in formulas" for this...

Select the table range A1:D4
Goto the menu Insert>Name>Create
Select Top row and Left column
OK

Then:

=INDIRECT(A10) INDIRECT(B10)
 

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