Building a customized, fuzzy and multiple Vlookup - excel

Ok so, twice a month I receive a large file of about 100 rows, which contains 4 columns:
Building name - value - county - state
I´ve to complete 2 other columns based on a master list that have thousands of entries.
I want to produce something very similar to this fabulous add-in (http://www.microsoft.com/en-us/download/details.aspx?id=15011), but a bit simpler and that I could use at work without problems.
What I need to do is the following:
In order to match my input with the master file, I know the county and state must match, but then, the building names can change a bit in each file for the same building (ie "John Miller #34" can be "Miller, John 34 A"), and that the values may vary but not too much.
Based on that, I want to bring from the master to my file, all the entries that may match each of my rows, filtering by County and State first, and then by similarity in name and value.
Could you please share your thoughts on how you´d approach this?
I know this is not a simple thing, but anything may help!

You could also use wildcards to try and match on the primary identifier within the name. from your example, that might be "Miller", for example.

Unfortunately for you, the vlookup "fuzzy logic" is nowhere near reliable for your purpose (see the comment on my answer below for details), and you won't have any indicator as to whether the returned result is accurate or not.
It's possible to get 100% of what you want through some heavy coding in a user-defined function, but this is probably well beyond your comfort zone.
A clunky solution, although somewhat easy to explain and adopt, is to create an "identity column" for every unique scenario that can occur. So, for example:
Then you can import your master sheet and add the same identity column to the left, and perform your vlookup. When a new configuration is added you can just add that to the master list and it will populate in your imported file in future instances.
That said, if you are interested in learning, there have been many people who have walked in your shows and felt your pain. You may want to indulge in this:
http://www.mrexcel.com/forum/excel-questions/195635-fuzzy-matching-new-version-plus-explanation.html
Because what you are truly requesting is an algorithm. It's not a simple thing, but it's very possible. And if you take the time to learn you not only solve your immediate problem, but make yourself marketable as an Excel wiz. Good luck!

Related

Dynamically generate list of payment dates considering first/last date and client - ideal for controlling receivables of SaaS and recurrent contracts

I'm building an accounts receivable sheet in Google Sheets.
I would like to register the clients and their contract characteristics (client, payment frequency and price) in one sheet and I would like to dynamically generate the payment dates in another sheet.
The input sheet would look like this:
The output sheet would look like this:
I think it might be something in the QUERY and ARRAYFORMULA universe but I don't know how to configure it. Is there a way to dynamically generate the combination of Date and Client, taking into consideration first and last payment dates?
Sample in this link. If you'd like to use, please fill free to create a copy for yourself and post it in your answer.
Creating a 2D array of concatenated strings of dates and values can be a good first step in these kinds of problems.
I've demonstrated the idea in a tab called MK.Help on this sheet that I also shared in the comment above. This formula can be found in cell A2 and is generating the whole list:
=ARRAYFORMULA(QUERY(SPLIT(FLATTEN(Input!A2:A5&"|"&Input!D2:D5+SEQUENCE(1,CEILING(MAX(IFERROR((Input!E2:E5-Input!D2:D5)/Input!C2:C5))),0)*Input!C2:C5&"|"&Input!E2:E5),"|",0,0),"select Col2, Col1 where Col2<=Col3 order by Col2"))
Once you have the data in a big 2D array, you can flatten it out and then split it into it's component parts to make it query'able. I've tried to outline the process to the right of the solution.
#MattKing's answer was really good but I particularly had problems since all my inputs would have dynamic sizes and doing his step by step I couldn't figure how to adapt to this situation.
So, using a lot of Matt's inspiration and some extra research (including this new question) I came to a solution that worked better for me, using multiple pages to come to a final result. Not so classy but works.
I left my solution available in this sheet.
Even though, I've chosen to accept Matt's answer since it worked, it helped me, it looks "more pythonic" and maybe the need to be so dynamic wasn't so clear in the question.

Power BI | Filter and select values higher than a reference, GIVEN ADDITIONAL conditions

I've been recently hired as an intern, and a challenge my area has come accross is how to highlight the closest available medical appointment.
Of course, I know that in excel such a thing would be pretty simple, with a matrixial formula like {=MIN(IF( range > current_date_and_time ; range ))} and as such, in PowerBi it should be just as simple.
However, the PowerBi table the area is dealing with shows the entire agenda and another column indicates if it has been reserved or not (with a 1 and 0). So, I'm wondering how to incorporate this condition toe excel formula, and in the end, how to get the closest AVAILABLE appointment in the agenda.
Eventually, the idea is to apply this "filter" for each doctor, and then aggregate by area.
I also know that good manners dictate I show you the data, but this is work related, so I can't do that.
Thanks beforehand, and sorry for the trouble
the problem has been solved, though by means of a different answer. THANKS

Select filtering and applying quantity amount to listed percentages

I tried to search but didn't find anything that was exact to what I was looking for. Let's say that I have the Investment$$ and I want to allocate that amount to only Items = to Toy Story and where Character begins with TS. The Investment $$ should only be applied to "Toy Story" and where character begins with "TS".
Apologies on not being able to embed the pictorial example to this message.
I need to write this in VBA. My questions is, is the best way to do this through a vlookup (programmed via VBA)? I want to avoid having the $1000 applied to the wrong movie title and even when it is applied to the right one (Toy Story) I want to make sure it's applied to the right ("TS") ones.
I'll also experiment on my end as well.
Pixar Movie Example
No need for VBA here. You can go with a plain vanilla Excel formula.
What you need in this situation is a key/ID item for your VLOOKUP - how you make that key is up to you, but with it you can easily utilize VLOOKUP. See my below example:

problems with excel showing producs when insterting measurments with multiple results

Hello i'm having problems with getting this to work. What i'm trying to do is when you insert a set of measurements i want excel to show the ( In this case products) which are closest to those measurements.
here is a picture:
The result i'm trying to reach is when you type in the measurements you get product(s) and the manufacturer which are closest to those measurements.
Any help is greatly appreciated.
In essence, what you are after is an index+match function. It will allow you to find a value in one list, given a corresponding variable. In this case, given a measurement, it will find a manufacturer and product combo in your list.
Your problem is that you will need to adapt your data to allow for this. For example, you need to decide whether you only want the closest match for measurements or if you need the closest match that is greater than the measurement you provide.
It is also possible that you'll need to split your measurement column into two different columns (unless all you need is the total area irrespective of individual lengths).
You could potentially avoid the index+match by using conditional formatting, but that would still require the data manipulation.
Given the information you provided, the answer will never be much more informative than this. But this should get you started and the following steps can be made easier with help from google.

Excel nested if formulas

I've currently got a Uni project underway and part of this project is an excel spreadsheet which involves inputting data (to be later to be outputted).
Anyway, I don't have too much experience with Excel or programming at all, and I've come across a situation where I need some help.
The project involves building a climbing frame, using EITHER the material Wood, Steel or Aluminium.
In the input table, I have added a "Material Quantity" row where a user can select the material they would like to use (from the above list), and then the amount of material they want to use.
The problem is that the materials Steel and Aluminium can ONLY be provided in increments of 6 metres, while Wood can only be provided with an increment of 1 metre.
As you can guess, I want to create something where a user can select their chosen material and then ONLY be able to enter a amount with the same multiple of what it can be provided in. For example, if a user selects "Steel", they can only enter a value with a multiple of 6m - if they enter, for example, 10m, then I want it to return a error.
After some reading, I think the way to solve this problem is to use a nested IF statement with a MOD command too. If anyone can help me with the forumla it would be much appreciated.
The attached picture is what I've acheived so far (and an idea for you guys to see what I'm dealing with). I really have no clue how to approach the problem :(
Use this formula:
=OR(AND(E8="Wood",MOD(F8,1)=0),AND(OR(E8="Steel",E8="Aluminium"),MOD(F8,6)=0))
Another option would be to allow the user to input the exact length of material and then calculate the amount they will need using the 'MROUND' function.
=IF(OR(E8="steel",E8="aluminum"),MROUND(F8,6),IF(E8="wood",MROUND(F8,1),"Not valid"))

Resources