Help with a lookup formula

Acallys

New Member
Joined
Nov 21, 2013
Messages
12
I've created this spreadsheet to record my stats for playing the game Hearthstone. In the columns T, U, V and W I have my class vs class statistics that I've just started recording. The idea behind this is to have it correlating to a table that shows percentages in rows 33-42 using columns A-J. You can see that I have only recorded one stat so far with this which is Shaman vs Mage with a 1 - 0 win rate. V and W will always either be a 1 or a 0 depending on who won the game as they are best of ones.

So the trouble I'm having was to turn the T-W and get a percentage total in the lower table. The only way I could think of that was to have a step in between which is further right on the spreadsheet, starting from AA and onwards. Then the bottom table takes it from there and turns it into a percentage. If there is an easier way to do that to not have all that stuff convoluting the spreadsheet, that would be great to know.

Above that table is the last thing that I'm working on. Underneath the "TOP 5" in cells A-C and rows 27-31 I'm wanting to do the last table. The idea is to have the class that I'm playing in A (ex. Shaman from the one statistic I have recorded), and the played against class in B, and the percentage winrate in C. I tried to do an HLOOKUP and VLOOKUP formula taking information from the table below, but I couldn't get it to work. I can't think of a way of getting this to work as there is too much info to do a nested IF function. I also don't know how to get it to read the information and place the played and played against class into A and B respectively.

Your help for these formulae would be much appreciated, thanks in advance!

TL;DR - Trying to get cells A-C, 27-31 filled with: A = class played, B = class played against, C = winrate %. Used by taking the information from the table below, which takes the info from cells AA and onwards to the right, which takes info from columns T-W.


https://mega.co.nz/#!yowm1aKZ!ZlLRySDRWDiwJoTv6HmQCV_Dn6dTTltg7qbRMoSCdCA - link to the spreadsheet
 
playedwon%won
ShamanHunter1ShamanHunter1ShamanShaman00n/a
PriestPaladin0PriestPaladin2ShamanPriest00n/a
MageWarlock1MageWarlock3ShamanMage00n/a
HunterPaladin0HunterPaladin4ShamanHunter11100.0
PaladinRogue1PaladinRogue5ShamanPaladin00n/a
WarlockWarrior1WarlockWarrior6ShamanWarlock00n/a
PaladinRogue0PaladinRogue7ShamanRogue00n/a
RogueDruid1RogueDruid8ShamanWarrior00n/a
WarriorWarlock0WarriorWarlock9ShamanDruid11100.0
RogueMage1RogueMage10PriestShaman00n/a
DruidWarrior1DruidWarrior11PriestPriest00n/a
WarlockWarrior0WarlockWarrior12PriestMage00n/a
MageRogue1MageRogue13PriestHunter00n/a
WarriorHunter0WarriorHunter14PriestPaladin100.0
WarriorPaladin1WarriorPaladin15PriestWarlock100.0
RogueWarlock1RogueWarlock16PriestRogue00n/a
MagePaladin0MagePaladin17PriestWarrior00n/a
MageRogue0MageRogue18PriestDruid00n/a
PaladinWarrior0PaladinWarrior19MageShaman00n/a
WarriorRogue1WarriorRogue20MagePriest00n/a
ShamanDruid1ShamanDruid21MageMage11100.0
PriestWarlock0PriestWarlock22MageHunter00n/a
MageMage1MageMage23MagePaladin100.0
HunterWarrior0HunterWarrior24MageWarlock11100.0
PaladinWarrior1PaladinWarrior25MageRogue3266.7
WarlockRogue1WarlockRogue26MageWarrior2150.0
PaladinHunter0PaladinHunter27MageDruid00n/a
RoguePaladin1RoguePaladin28HunterShaman00n/a
WarriorWarlock0WarriorWarlock29HunterPriest00n/a
RoguePaladin1RoguePaladin30HunterMage00n/a
DruidRogue1DruidRogue31HunterHunter00n/a
WarlockWarrior0WarlockWarrior32HunterPaladin100.0
MageRogue1MageRogue33HunterWarlock00n/a
WarriorDruid0WarriorDruid34HunterRogue00n/a
RogueWarlock1RogueWarlock35HunterWarrior100.0
RogueMage0RogueMage36HunterDruid00n/a
MageWarrior0MageWarrior37PaladinShaman00n/a
MageWarrior1MageWarrior38PaladinPriest00n/a
PaladinRogue0PaladinRogue39PaladinMage00n/a
WarriorRogue1WarriorRogue40PaladinHunter100.0
41PaladinPaladin00n/a
2242PaladinWarlock00n/a
43PaladinRogue3133.3
44PaladinWarrior2150.0
45PaladinDruid00n/a
46WarlockShaman00n/a
47WarlockPriest00n/a
48WarlockMage00n/a
49WarlockHunter00n/a
50WarlockPaladin00n/a
51WarlockWarlock00n/a
52WarlockRogue11100.0
53WarlockWarrior3133.3
54WarlockDruid00n/a
55RogueShaman00n/a
56RoguePriest00n/a
57RogueMage2150.0
58RogueHunter00n/a
59RoguePaladin22100.0
60RogueWarlock22100.0
61RogueRogue00n/a
62RogueWarrior00n/a
63RogueDruid11100.0
64WarriorShaman00n/a
65WarriorPriest00n/a
66WarriorMage00n/a
67WarriorHunter100.0
68WarriorPaladin11100.0
69WarriorWarlock200.0
70WarriorRogue22100.0
71WarriorWarrior00n/a
72WarriorDruid100.0
73DruidShaman00n/a
74DruidPriest00n/a
75DruidMage00n/a
76DruidHunter00n/a
77DruidPaladin00n/a
78DruidWarlock00n/a
79DruidRogue11100.0
80DruidWarrior11100.0
81DruidDruid00n/a
battlepercentrank
DruidWarrior100.01
DruidRogue100.02
WarriorRogue100.03
WarriorPaladin100.04
RogueDruid100.05
RogueWarlock100.06
RoguePaladin100.07
WarlockRogue100.08
MageWarlock100.09
MageMage100.010
ShamanDruid100.011
ShamanHunter100.012
MageRogue66.713
RogueMage50.014
PaladinWarrior50.015
MageWarrior50.016
WarlockWarrior33.317
PaladinRogue33.318
WarriorDruid0.019
WarriorWarlock0.020
WarriorHunter0.021
PaladinHunter0.022
HunterWarrior0.023
HunterPaladin0.024
MagePaladin0.025
PriestWarlock0.026
PriestPaladin0.027

<colgroup><col span="2"><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0

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.
If I understand correctly what you want, maybe this can helps:

Layout

TOP 5Win ClassAgainstWin
DruidMage75% DruidMage1
HunterHunter60% HunterHunter1
DruidDruid50% DruidHunter1
DruidHunter40% MageDruid1
MageDruid33% MageHunter0
DruidMage1
DruidHunterMage DruidDruid1
Druid50%40%75% DruidMage1
Hunter0%60%0% HunterHunter1
Mage33%33%0% DruidHunter0
MageDruid0
MageHunter1
DruidMage1
DruidHunter0
DruidMage1
HunterHunter1
DruidHunter0
DruidMage1
HunterHunter0
DruidHunter1
MageDruid0
MageHunter0
DruidMage0
DruidDruid0
DruidMage0
HunterHunter0
**************************************************

<colgroup><col width="42" style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;" span="4"> <col width="17" style="width: 13pt; mso-width-source: userset; mso-width-alt: 621;"> <col width="42" style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;" span="2"> <col width="37" style="width: 28pt; mso-width-source: userset; mso-width-alt: 1353;"> <tbody>
</tbody>

Formulas

Code:
In A2

=INDEX($A$9:$A$11,
LARGE(IF(RANK($B$9:$D$11,$B$9:$D$11,1)-ROW($B$9:$D$11)/10^7=LARGE(RANK($B$9:$D$11,$B$9:$D$11,1)-ROW($B$9:$D$11)/10^7,ROWS($A$2:$A2)),
ROW($B$9:$D$11)-ROW($B$9)+1),1))

In B2

=INDEX($B$8:$D$8,
LARGE(IF(RANK($B$9:$D$11,$B$9:$D$11,1)-COLUMN($B$9:$D$11)/10^5=LARGE(RANK($B$9:$D$11,$B$9:$D$11,1)-COLUMN($B$9:$D$11)/10^5,ROWS($B$2:$B2)),
COLUMN($B$9:$D$11)-COLUMN($B$9)+1),1))

In C2

=LARGE($B$9:$D$11,ROWS($C$2:$C2))

In B9

=IFERROR(SUMIFS($H$2:$H$27,$F$2:$F$27,$A9,$G$2:$G$27,B$8)/COUNTIFS($F$2:$F$27,$A9,$G$2:$G$27,B$8),0)


Markmzz
 
Upvote 0
Sorry I've been quite busy and have just managed to sit down and take another look. I tried to use the formulas that you gave me Markmzz, and they seemed to work, but it's coming up with the #VALUE! error in the A2 and B2 brackets and when I drag them down. I currently don't have enough proper statistics to fill out the entire area that has percentages, so I just manually added in some percentages for the sake of it. Here is a copy of the current one with the formulas added in, if you could direct me to why it's giving me the #VALUE! I would be extremely grateful.

Thanks in advance!

https://mega.co.nz/#!2lZE3SRa!RhtsZV1dpfCNc68B1M3gyzIm8noxUPwCriR3W-p7TT0
 
Upvote 0
And thank you Oldbrewer, but I'm not sure what you're doing there. I'm just in need of assistance with the formulas for the cells that Markmzz has given me.
 
Upvote 0
Sorry I've been quite busy and have just managed to sit down and take another look. I tried to use the formulas that you gave me Markmzz, and they seemed to work, but it's coming up with the #VALUE! error in the A2 and B2 brackets and when I drag them down. I currently don't have enough proper statistics to fill out the entire area that has percentages, so I just manually added in some percentages for the sake of it. Here is a copy of the current one with the formulas added in, if you could direct me to why it's giving me the #VALUE! I would be extremely grateful.

Thanks in advance!

Hi Acallys,

I'm sorry, my mistake.

Try this:

Code:
In A2 - [COLOR="#FF0000"]use Ctrl+Shift+Enter and not only Enter to enter the formula[/COLOR]

=INDEX($A$9:$A$11,
LARGE(IF(RANK($B$9:$D$11,$B$9:$D$11,1)-ROW($B$9:$D$11)/10^7=LARGE(RANK($B$9:$D$11,$B$9:$D$11,1)-ROW($B$9:$D$11)/10^7,ROWS($A$2:$A2)),
ROW($B$9:$D$11)-ROW($B$9)+1),1))

In B2 - [COLOR="#FF0000"]use Ctrl+Shift+Enter and not only Enter to enter the formula[/COLOR]

=INDEX($B$8:$D$8,
LARGE(IF(RANK($B$9:$D$11,$B$9:$D$11,1)-COLUMN($B$9:$D$11)/10^5=LARGE(RANK($B$9:$D$11,$B$9:$D$11,1)-COLUMN($B$9:$D$11)/10^5,ROWS($B$2:$B2)),
COLUMN($B$9:$D$11)-COLUMN($B$9)+1),1))

In C2 - use only Enter to enter the formula

=LARGE($B$9:$D$11,ROWS($C$2:$C2))

In B9 - use only Enter to enter the formula

=IFERROR(SUMIFS($H$2:$H$27,$F$2:$F$27,$A9,$G$2:$G$27,B$8)/COUNTIFS($F$2:$F$27,$A9,$G$2:$G$27,B$8),0)


Markmzz
 
Upvote 0
Actually I'm mistaken, it doesn't seem to be working properly. I'll have to come back and take another look when I get a chance. But what I'm noticing is that currently it's returning me a Shaman, Hunter, 100%, but this is incorrect as that matchup is at a 0 from 1 loss at 0%.

Also where do I put in the digit for the =LARGE($B$34:$J$42,ROWS($C$27:C27)) formula to differentiate between first, second, third, fourth and fifth?
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,124,996
Members
449,201
Latest member
Lunzwe73

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