# Look up a corresponding text value based on a unique number in a range of numbers

I have a range of unique numbers that say are located in the range A2:D100, and corresponding text values are in the header of the range in A1:D1. What's the best way to return the text value based on the unique number. I realized I can't do it with SUMPRODUCT lookup since sumproduct lookups don't return text values.
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Have you looked at the function vlookup() and hlookup()

Not sure I understand your question, but I suspect one or the other of these functions will do what you want --

http://www.techonthenet.com/excel/formulas/hlookup.php

============
0
Author Commented:
To illustrate:

Dog               Cat              Mouse
0.2570      0.5804      0.9788
0.6996      0.3740      0.7969
0.8522      0.4584      0.6056
0.4455      0.5940      0.0239
0.9675      0.0059      0.8557
0.8891      0.9361      0.3796
0.3450      0.7439      0.4690
0.9793      0.0408      0.6457

I need to return text from the first row based on a unique number within a range, so for 0.5940 lookup will return "Cat".
0
Excel VBA DeveloperCommented:
What if the numeric value exists in more than one column?
0
Excel VBA DeveloperCommented:
Here is a solution that will return the column name if unique values exist.

If your data range is in columns A:C and the value you are looking for is in cell E2, enter this formula:

I only extended this to 20 rows; you can change that value as appropriate.

See example workbook.

-Glenn
EE-IdentifyColumn2.xlsx
0
Author Commented:
Numeric values are totally unique and don't repeat in this specif situation.
0
Excel VBA DeveloperCommented:
Slightly simpler solution; shortens the COLUMN reference:
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for tyler43's comment #a40244251

for the following reason:

Works like a charm! Thanks!
0
Excel VBA DeveloperCommented:
Hi,

If my answer was acceptible, can you please click the "Accept this solution" above my previous post with the correct solution?  That will properly close the question and make it available to other EE users.

Thanks,
Glenn
0
Author Commented:
sorry I think I did something wrong initially while trying to close the question
0
Excel VBA DeveloperCommented:
Thanks for accepting my solution; I'm glad I was able to help.

-Glenn
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.