Excel vlookup with variable information

HNarli

New Member
Joined
Jun 26, 2018
Messages
4
Helloooo,

Is there a way please to lookup information from other spreadsheets based on variable information?
This is quite hard to explain so I’m just going to list out what I have below and hope that someone can make sense of what I am trying to ask!
So this is a little mock up of my scenario:


A B C D
1. PartNo Supplier Qty Discount
2. 8888 Vaxhaul 1 0%
3. 2000 Skoda 5 25%
4. 1234 Honda 3 15%

A2 = I type the part number in the spreadsheet here
B2 = Cell B2 then does a Vlookup based on the part number and pulls the supplier name in
C1 = I type into here the quantity of cars being purchased for example 1
D1- The complicated bit. I would like to use the quantity information in C2 and the supplier name in B2 to cross reference another spreadsheet which will tell me the supplier discount rate based on the number of cars that are being purchased.
For example I would like to us the value in B2 (supplier name) to locate a corresponding spreadsheet saved in C: > Supplier > Discounts > (Filename = Vaxhaul). I would then like to look up cells within this spreadsheet. This spreadsheet is very simple and looks like this.


File Name: Vaxhaul
A B
1. 1 0%
2. 2 10%
3. 3 15%
4. 4 20%
5. 5 25%

So this is where the if the quantity information in C2 matches the value in A1 to A5 you can tell the corresponding discount.
Now some of you may be reading this thinking why don’t I just do one spreadsheet on discount? The reason being is because each of our suppliers gives us different discount! So we need a way of basing the discount on which supplier is chose.

I'd be interested in hearing's peoples thoughts on this. Perhaps it is not doable? But I thought I would ask just in case!
My Excel skills are VERY BASIC, so I would refer some type of in-cell formula if this is possible? I don't understand Macros at the minute.

Thanks in advance for your comments :)
 

DRSteele

Well-known Member
Joined
Mar 31, 2015
Messages
2,048
Office Version
365
Platform
Windows
This use of numerous files for each Supplier is probably not effcienet and restricts what formulas can be used. It would be better to put all the supplier information into several worksheets within the workbook, especially since it is so simple in nature. Is that acceptable?
 

HNarli

New Member
Joined
Jun 26, 2018
Messages
4
Hi, I hope you get this reply as I haven't used this forum for a long time! I don't think this would work. The reason being is my scenario is a very simplistic explanation of a wider network of things. You see we use Excel to produce a quotation but each time we make a quotation we open a template file and then create a copy from this. If we make a new revision of a quote we don't go back to the original template file we make a duplicate of the R0 file we created. So what would happen with the supplier information is it would all the time be updating in the master file but as we make new copies of quotes from older files we would not be using accurate data. Whereas if any file if it were old or new was always pointing to the same file path than the data would always be up-to-date if that makes sense? Putting all the data in one workbook certainly sounds like an easier way of doing things, but I don't think it could work this way for us?
 

Forum statistics

Threads
1,082,246
Messages
5,363,991
Members
400,772
Latest member
solbebe

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top