VLOOKUP with multiple matching IDs

faqir41

New Member
Joined
Mar 18, 2020
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Hi.

I have an investor spreadsheet with products [vehicles] that have been sold and their profits. call this stocksheet

Some vehicles have multiple investors (maximum 3 investors) on the stocksheet.

I have created a seperate summary sheet per investor, called investor statement.

On investor statement, cells E4 F4 AND I4 self populate with vlookup once I manually enter vehicle cost code. In this example its W17.

I desperately need a formula for cells G4 and H4 to self populate when I enter W17 into D4.

I would like G4 and H4 to firstly recognise D4 cost code W17 which was manually entered, then look at the investor name in B2, in this case YC, then lookup YC in stocksheet W17 and populate itself from the range T19 to Y19.

the tricky part for me is that it needs to recognise which cell investor YC is in the stocksheet for that cost code W17.

If he is investor A, B, or C it needs to return the correct values accordingly from the range T19 to Y19.

I fiddled with vlookup and match but couldnt get it right.


Please assist. much appreciated


thanks in advance.

Nazir
 

Attachments

  • INVESTOR STATEMENT.png
    INVESTOR STATEMENT.png
    49.5 KB · Views: 12
  • STOCKSHEET.png
    STOCKSHEET.png
    69.6 KB · Views: 12

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi, re investor statement, a good habit would be to enter data in a single row... Wrap text and Merge and center or unaligned data are a bit more tricky to handle.
Example date is row 3 cost code is row 4.
 
Upvote 0
Welcome to the MrExcel board, Nazir.

Try this to see if it gives the results you were expecting. I've added YC as both investor A and C in this example to confirm that the formulas were pulling information from the right columns in the STOCKSHEET.

Book1.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXY
1
2Cost CodeModel YearMakeDescriptionInvestor AInvestor BInvestor CInvestor Cap Cost AInvestor Profit AInvestor Cap Cost BInvestor Profit BInvestor Cap Cost CInvestor Profit C
3W192018VWGOLF 1MGNC30000033982100002379
4W172018VWTIGUANYCIHYC30100071181400003321130001111
5W202019VWGOLF 2IHYC30800038301430001779
6W212019ToyotaFORTUNERYCIH19600019243600003535
STOCKSHEET


Book1.xlsx
ABCDEFGHI
1SUMMARYDATEcost codeDESCRIPTIONDAYS IN STOCKCAPITAL COSTINVESTOR PROFITCAPITAL RETURN AFTER SALE
2INVESTORYC10-Feb-19
3
4CAPITAL INV350000W17TIGUAN753140008229300000
5
INVESTOR STATEMENT
Cell Formulas
RangeFormula
G4G4=SUMPRODUCT(--(STOCKSHEET!$G$3:$G$6=$B$2),--(STOCKSHEET!$C$3:$C$6=$D4),INDEX(STOCKSHEET!$C$3:$Y$6,,18)) + SUMPRODUCT(--(STOCKSHEET!$H$3:$H$6=$B$2),--(STOCKSHEET!$C$3:$C$6=$D4),INDEX(STOCKSHEET!$C$3:$Y$6,,20)) + SUMPRODUCT(--(STOCKSHEET!$I$3:$I$6=$B$2),--(STOCKSHEET!$C$3:$C$6=$D4),INDEX(STOCKSHEET!$C$3:$Y$6,,22))
H4H4=SUMPRODUCT(--(STOCKSHEET!$G$3:$G$6=$B$2),--(STOCKSHEET!$C$3:$C$6=$D4),INDEX(STOCKSHEET!$C$3:$Y$6,,19)) + SUMPRODUCT(--(STOCKSHEET!$H$3:$H$6=$B$2),--(STOCKSHEET!$C$3:$C$6=$D4),INDEX(STOCKSHEET!$C$3:$Y$6,,21)) + SUMPRODUCT(--(STOCKSHEET!$I$3:$I$6=$B$2),--(STOCKSHEET!$C$3:$C$6=$D4),INDEX(STOCKSHEET!$C$3:$Y$6,,23))
 
Upvote 0
thanks a lot krice!! you are a legend! your formula worked perfectly! much appreciated.

@cyrilbrd...thanks for the guideline. the spreadsheet has more columns that are hidden due to me not wanting to complicate the question. so all good. thanks.
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,543
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top