# Lookup a value in column based on the value in a seperate column

We have several people with the same job category and different price.
All charges for the same category are the same on a given day.
We need to report only the price charged per category not name.
I need to look up the price charged for the current day if the the quantity is greater than zero
lookup-price-for-service-used.xlsx
###### 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:
see if this solve your issue?
lookup-price-for-service-used-b.xlsx
1
Training DeveloperAuthor Commented:
A pivot table would work however, I am looking for a variation on VLookup or Index Match that can be entered into a cell.
0
Commented:
ok, see attached updated table using sumif to get the total and use vlookup to get the price
lookup-price-for-service-used-c.xlsx
0
Training DeveloperAuthor Commented:
The first table contains the data
The second table has row headers and requires formulas in cells H5 and H6 to display the price that is looked up from the first table.
=VLOOKUP(G5,\$C\$5:\$D\$9,2) does not work because we need to look up only the price where column E is >0
lookup-price-for-service-used.xlsx
0
Training DeveloperAuthor Commented:
{=INDEX(\$D\$5:\$D\$9, MATCH(G5&1,\$C\$5:\$C\$9&\$E\$5:\$E\$9,0))}
seems to work..
lookup-price-for-service-used.xlsx
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.

Commented:
0
Commented:
You can use a non-array formula which is this...

=LOOKUP(2,1/((\$C\$5:\$C\$9=G5)*(\$E\$5:\$E\$9=1)),\$D\$5:\$D\$9)

It will be faster and lighter then the array formula that you are using...

Saurabh...
0
Training DeveloperAuthor Commented:
figured it out
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.