2
votes

My current workbook contains the team's stock trading data on a day by day basis. I've been looking to setup a vlookup so that I can see commission figures by primary sales trader. However, the vlookup has been turning up incorrect values when set to either FALSE, or TRUE setting.

enter image description here

=VLOOKUP($B20,A1:M17,12,0)

I've attached a screenshot of a dummy worksheet above which I created to illustrate, as well as the vlookup formula. As you can see, for primary sales trader "AB", the vlookup returns the incorrect figure, providing the commission value in cell L4, and not including AB's commission figure in cell L5. Any suggestions on where I'm going wrong with this would be appreciated.

2

2 Answers

1
votes

Try summing all of AB's commissions.

=sumifs(L4:L17, A4:A17, B20)
1
votes

The VLOOKUP is working correctly. VLOOKUP returns the first occurrence of the match. One solution is to use SUMPRODUCT and EXACT...

=SUMPRODUCT(--(EXACT(B14,A4:A10)),L4:L10)