Pergunta

I am trying to solve, which for most of you would be a simple problem (apologies)

Sample example

I am trying to fill the margins from the first table on the left onto the 'Col G' on the right side table. (in actuality, this table is very large).

Now if you note, the 'New fund' has two trusts, and when I try to use Vlookup in the cell 'G7' to find 'New Fund' on the left table, it always finds the first one - 'B6' (and disregards what trust this cell is connected with, and gives me the corresponding margin which comes out to be wrong, since it shows up against the wrong trust).

Example, if in G7, i use =vlookup(E7, B2:C7, 2) it gives me 56% always, and never shows 44%. I know I am doing it wrong, since I am not directing the formula to pay attention to the trust, but I am confused as to what the new formula should look like.

Is there something I can do so that I can search the 'New fund' from table 1, then, the trust value against it, and then find the corresponding margin value?

Thanks for all your help and apologies if this is lame.

Regards, Ash

Foi útil?

Solução

You can use =SUMPRODUCT() and =INDEX() to perform the double-match. In G2 enter:

=INDEX(C$1:C$100,SUMPRODUCT((A$1:A$100=F2)*((B$1:B$100=E2)*ROW($1:100))))

adjust the ranges to match the size of your table.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top