Ok, this is going to be a difficult question to ask, but I'm gonna give it a try.
I have three sheets (Sheet1, Sheet2, Sheet3) in one worksheet (Worksheet).
Sheet1 contains ~100,000 rows with columns Company (A), Holding (B), Product (C), Year (D), Spend (E).
Sheet2 contains 100 rows with columns Company (A), Holding (B), Product Spend in certain Year (C).
Sheet3 contains 100 rows with columns Company (A), ID (B), Variant1 (C), Variant2 (D), Variant3 (E).
What I want, is in Sheet2 to calculate the Product Spend in certain Year. I've been able to do this as a test in Sheet1 by using the function SUMIFS. So in Sheet1 I used:
=SUMIFS(E:E,A:A,"Fake Ltd",B:B,"Fake Holding",C:C,"Dog Food",D:D,"2011")
The problem is that the company names aren't the same in all sheets. I tried to solve it via a FuzzyFind, but that is not working perfectly enough. So I decided to change my methods, and that's why Sheet3 exists. This sheet contains all different name variants of one company in one row (similar to a relational database).
Now I need to use this SUMIFS function in Sheet2 where the company name relates to all possible other company names in Sheet3 so it can sum the company names that appear in Sheet1 as if it were one company name. The column Company in Sheet3 is the 'chosen' company name and also the one used in Sheet2. It's Sheet1 that gives the problem.
So somehow I need to combine SUMIFS with VLOOKUP in Sheet2, but I am not sure how. Anyone any clues? I'll do my best to improve my question, I can imagine if I didn't do the best job explaining.