Spreadsheet: 158506d1338285556-reverse-horizontal-lookup-from-a-vertical-code-book1_splendidus
Sheet: Sheet1

Code | Assets |  |  |  |  |  | Liabilities |  |  | Other |  |  | Transactions |  |  |  |  |  |  |  | For each code, I need to find Top 5 products
 | Product1 | Product2 | Product3 | Product4 | Product5 | Product6 | Product7 | Product8 | Product9 | Product10 | Product11 | Product12 | Product13 | Product14 |  |  |  |  |  |  | And return their names and values
123 | 19768.32 | 623635.6036335983 |  | 89912.242022 | 2320 |  | 40408.74021732264 | 2712.085821008514 | 4026.272246311245 |  |  | 48922.16474468567 | 7899.74 | 17426.831622997 |  | 1 | 123 | Product2 | 623635.6036335983 |  | So output would look something like this
345 | 23552.64 | 150901.3121486976 | 224964.2984347449 | 122280.833132 | 960 |  | 86202.99064172842 | 19119.26626846797 | 3797.995496426 |  |  | 30003.13852394901 | 19956.02 | 33340.16549879903 |  |  |  | Product4 | 89912.242022
789 | 25850.88 | 594848.1678111497 | 272426.2247639535 | 63945.08658800001 | 3360 |  | 129587.0325181295 | -620.1170811373916 | 45138.83790826312 |  |  | 63798.41834619919 | 24589.74 | 149742.3556213533 |  |  |  | Product12 | 48922.16474468567 |  | Name | Value
1011 | 4872.959999999999 | 59835.83350716323 |  | 79018.35302 | 960 |  | 50229.57649032576 | -1150.0609635847 | 19554.08834650903 |  |  | 7188.295880108656 | 24083.03 | 23028.72962532401 |  |  |  | Product7 | 40408.74021732264 | 1 | top1 name | top 1 value
1213 | 26732.16 | 237585.2559051067 | 69437.95702589634 | 91640.200404 | 3200 |  | 31947.27161257337 | 1187.366244389833 | 10142.18312515496 |  |  | 45741.03871704078 | 7599.11 | 16460.01462476458 |  |  |  | Product1 | 19768.32 | 2 | top2 name | top2 value
1415 | 55157.76 | 448909.534932224 | 28514.11898944738 | 145469.967391 | 3760 |  | 119679.8755129859 | 25231.63498874196 | 11040.37039951114 |  |  | 47122.25911444653 | 11615.92 | 221921.9347543528 |  | 2 | 345 | Product3 | 224964.2984347449 | 3 | etc.
1617 | 44271.36 | 403649.9536848106 | 165490.6230938634 | 78297.08837499999 | 6800 |  | 69505.85749185053 | 5337.444969282263 | 10439.91002909717 |  |  | 104557.4538916645 | 17953.89 | 16635.622326886 |  |  |  | Product2 | 150901.3121486976 | 4
1819 | 27613.44 | 181195.9353921357 |  | 39240.74111800001 | 3360 |  | 42291.844160188 | -199.0238897882485 | 2809.140368973916 |  |  | 42223.6654877874 | 20399.61 | 39150.66913610792 |  |  |  | Product4 | 122280.833132 | 5
2021 | 18869.76 | 190188.7649311953 | 130237.6782138035 | 121089.857692 | 1440 |  | 68325.0161642254 | -646.7378238154757 |  |  |  | 55632.4985575797 | 16646.88 | 79602.5876288823 |  |  |  | Product7 | 86202.99064172842
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product14 | 33340.16549879903
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 3 | 789 | Product2 | 594848.1678111497
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product3 | 272426.2247639535
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product14 | 149742.3556213533
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product7 | 129587.0325181295
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product4 | 63945.08658800001
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 4 | 1011 | Product4 | 79018.35302
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product2 | 59835.83350716323
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product7 | 50229.57649032576
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product13 | 24083.03
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product14 | 23028.72962532401
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 5 | 1213 | Product2 | 237585.2559051067
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product4 | 91640.200404
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product3 | 69437.95702589634
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product12 | 45741.03871704078
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product7 | 31947.27161257337
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 6 | 1415 | Product2 | 448909.534932224
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product14 | 221921.9347543528
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product4 | 145469.967391
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product7 | 119679.8755129859
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product1 | 55157.76
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 7 | 1617 | Product2 | 403649.9536848106
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product3 | 165490.6230938634
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product12 | 104557.4538916645
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product4 | 78297.08837499999
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product7 | 69505.85749185053
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 8 | 1819 | Product2 | 181195.9353921357
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product7 | 42291.844160188
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product12 | 42223.6654877874
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product4 | 39240.74111800001
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product14 | 39150.66913610792
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 9 | 2021 | Product2 | 190188.7649311953
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product3 | 130237.6782138035
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product4 | 121089.857692
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product14 | 79602.5876288823
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Product7 | 68325.0161642254
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 10
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 11