Solved

Excel 2000 - Vlookup using

Posted on 2011-02-23
4
277 Views
Last Modified: 2012-05-11
Dear Experts,

Could you please have look the attached file, it simply contains a table on "Base" sheet

Item      Qty
A      10
B      5
C      9

from where the values are vlookup-ed on Sheet1 with formula =VLOOKUP(A2;Base!A:B;2;0).

Do you have maybe idea how to use VLOOKUP with a kind of condition on Item - if the Item is B, it should not bring the value so 5, in that case should bring value C so 9. With such trick the result on Sheet1 would be like below

Item      Qty
A      10
B      9
C      9


In my work unfortunately has such need, sometimes I have do summary sheets with vlookup, and there are such examples that if the value is "RedAuto", it is also auto so should bring value "Auto"

thanks,
AlternativeVlookup.xls
0
Comment
Question by:csehz
  • 2
4 Comments
 
LVL 50

Accepted Solution

by:
teylyn earned 500 total points
Comment Utility
Hello,

this description is not sufficient to provide a solution.

"if the Item is B, it should not bring the value so 5, in that case should bring value C so 9."

I have a feeling that this is a little too much simplification.  The formula would be

=VLOOKUP(IF(A2="B","C",A2),Base!A:B,2,1)

copied down. And that answers the question you have asked.

But I'm not convinced that this is the real solution you are after.

cheers, teylyn
0
 
LVL 17

Expert Comment

by:Sikhumbuzo Ntsada
Comment Utility
Add false at the end there that should fix your problem.
=VLOOKUP(A2;Base!A:B;2;false).
0
 
LVL 1

Author Closing Comment

by:csehz
Comment Utility
Teylyn thanks, yes I also need to think on it how will use in live, but your solution works for me.

Santasi24, I tried your formula but that one still brings 5 for B value, I would wait there 9.
0
 
LVL 17

Expert Comment

by:Sikhumbuzo Ntsada
Comment Utility
@teylyn Thanks for the clarification, I needed that as well.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now