Was wondering if someone out there could assist? I am building a sales data report (in Excel 2010) for our field team in which they can enter in an account number for one of their stores and the report spits out the top 6 selling items in order of sales rank.</SPAN>
I have the following formula which will return the heading (Sales Item) based on the rank:</SPAN>
I have tried combining this with an INDEX/MATCH statement to reference only the row relevant to the user inputted Acct # but it returns a #VALUE error. </SPAN>
My expected result and data is as per below:</SPAN>
Hopefully I make sense and hoping someone out there will be able to shed some light on how this can be done? </SPAN>
Greatly appreciate any assistance anyone can provide. </SPAN>
Thanks</SPAN>
Kate</SPAN></SPAN>
<TBODY>
</TBODY>
I have the following formula which will return the heading (Sales Item) based on the rank:</SPAN>
Code:
=IF(COUNTIF(B2:G2,1),LOOKUP(2,1/(B2:G2=1),B1:G1),"")</SPAN>
I have tried combining this with an INDEX/MATCH statement to reference only the row relevant to the user inputted Acct # but it returns a #VALUE error. </SPAN>
My expected result and data is as per below:</SPAN>
Hopefully I make sense and hoping someone out there will be able to shed some light on how this can be done? </SPAN>
Greatly appreciate any assistance anyone can provide. </SPAN>
Thanks</SPAN>
Kate</SPAN></SPAN>
SALES TABLE<o></o> | <o></o> | ||||||||||
<o></o> | A<o></o> | B<o></o> | C<o></o> | D<o></o> | E<o></o> | F<o></o> | G<o></o> | SAMPLE OUTPUT<o></o> | |||
1<o></o> | Acct.#<o></o> | Banana<o></o> | Pineapple<o></o> | Apple<o></o> | Orange<o></o> | Peach <o></o> | Cherry<o></o> | Acct #<o></o> | 123456<o></o> | ||
2<o></o> | 123456<o></o> | 750<o></o> | 223<o></o> | 124<o></o> | 653<o></o> | 121<o></o> | 353<o></o> | ||||
3<o></o> | 234567<o></o> | 167<o></o> | 712<o></o> | 653<o></o> | 862<o></o> | 456<o></o> | 332<o></o> | Sales Rank<o></o> | Fruit Type<o></o> | ||
4<o></o> | 345678<o></o> | 123<o></o> | 223<o></o> | 122<o></o> | 552<o></o> | 665<o></o> | 125<o></o> | 1<o></o> | Banana<o></o> | ||
5<o></o> | 456789<o></o> | 653<o></o> | 356<o></o> | 233<o></o> | 421<o></o> | 352<o></o> | 147<o></o> | 2<o></o> | Orange<o></o> | ||
6<o></o> | 567891<o></o> | 225<o></o> | 455<o></o> | 458<o></o> | 674<o></o> | 223<o></o> | 225<o></o> | 3<o></o> | Cherry<o></o> | ||
7<o></o> | 678911<o></o> | 682<o></o> | 653<o></o> | 585<o></o> | 365<o></o> | 665<o></o> | 109<o></o> | 4<o></o> | Pineapple<o></o> | ||
8<o></o> | 789112<o></o> | 885<o></o> | 128<o></o> | 721<o></o> | 428<o></o> | 158<o></o> | 289<o></o> | 5<o></o> | Apple<o></o> | ||
6<o></o> | Peach<o></o> | ||||||||||
RANKING TABLE<o></o> | |||||||||||
<o></o> | A<o></o> | B<o></o> | C<o></o> | D<o></o> | E<o></o> | F<o></o> | G<o></o> | ||||
1<o></o> | Acct.#<o></o> | Banana<o></o> | Pineapple<o></o> | Apple<o></o> | Orange<o></o> | Peach <o></o> | Cherry<o></o> | ||||
2<o></o> | 123456<o></o> | 1<o></o> | 4<o></o> | 5<o></o> | 2<o></o> | 6<o></o> | 3<o></o> | ||||
3<o></o> | 234567<o></o> | 6<o></o> | 2<o></o> | 3<o></o> | 1<o></o> | 4<o></o> | 5<o></o> | ||||
4<o></o> | 345678<o></o> | 5<o></o> | 3<o></o> | 6<o></o> | 2<o></o> | 1<o></o> | 4<o></o> | ||||
5<o></o> | 456789<o></o> | 1<o></o> | 3<o></o> | 5<o></o> | 2<o></o> | 4<o></o> | 6<o></o> | ||||
6<o></o> | 567891<o></o> | 5<o></o> | 3<o></o> | 2<o></o> | 1<o></o> | 6<o></o> | 5<o></o> | ||||
7<o></o> | 678911<o></o> | 1<o></o> | 3<o></o> | 4<o></o> | 5<o></o> | 2<o></o> | 6<o></o> | ||||
8<o></o> | 789112<o></o> | 1<o></o> | 6<o></o> | 2<o></o> | 3<o></o> | 5<o></o> | 4<o></o> |
<TBODY>
</TBODY>