Hi all
Sorry I have not replied in a while
I have been working away on it and I think I found a solution (although a very long winded one)
Had several issues with it (under statement)
Problem 1 - How to only show unique prizes won and not total prizes and then display the names the number of unique prizes not total prizes
Answer - Was easier than I thought after thinking about it really. On sheet one of my workbook where I had all the individual tables for finishing positions I added a column shown below in column BK to count cells containing text, which basically counts unique prizes.
Then the subtotal of this count was inserted onto the main worksheet showing the total unique prizes per person shown in Column E
Using the same formula that was given to me by a user on another forum, I ran his formula from this new column instead of the total count which resulted in names being displayed the number of times relative to unique prizes won and not total (Thank you shg for setting me on the right path!)
(formula's shown below)Problem 2 - How to get the prize ID's and number of prizes won to show in columns M2:N500
Answer - This was insane the more I thought about it, I naively thought I could do it all from the variable table on the main worksheet, but of course this would not work as when the figures changed in the variable table, so then would the prize ID's and number of prizes also change.
So.... I had to go the very very long way around of creating replicas of the prize ID's and number of prizes won in a descending table as shown below
From this set of information, on the main worksheet I had intended to use the simple enough formula to again replicate it to allow me to copy and paste as values on a blank worksheet, then highlighting and deleting the blank rows, but of course the rows were not blank even if they looked so (stupid excel)
I was stuck on this for ages, probably because my head hurt - but then I simply added to the formula to show text (the letter t) if a cell contained nothing as shown below:
Now with cells all containing something visible, I am able to now copy and paste as values these columns, then push f5, select special, then 'constants' and untick everything other than text!
That way I can delete all the rows containing text and shift the rows up so all the Prize ID's and number of each prize are in order.
Then I simply copy paste this into the main workbook along side the names of the prize winners and tada!!!
Magic
Worksheet 1 part 1Only variable shown is the Buy-in amount and the number of entrants - Prizes are calculated automatically depending on these figures
Worksheet 1 part 2These individual tables are the Prize ID calculations depending on the size of overall prize won
Formula in Cell BB5:BB15 is -
=IF(BA>=1,$S$2-(AZ5*BC5),$S$2) - a basic formula to look up overall prize remaining and deduct prize ID amount if remaining overall prize is enough, then move on down the smaller amounts.
Cells BD16 / BJ16 etc were important to display prize winners the number of times on worksheet 2
Worksheet 2This is where prize winners and their prizes won are displayed
Cells B:2:B500 are variable and manually copy pasted in from competition results
Depending on the competition buy in and number of entrants selected on worksheet 1, the prizes for these players is automatically displayed in cells C2:F500
Column E is the unique prizes taken from worksheet one (shown above)
Formula in cell F2 is - =SUM(E1, F1) and then dragged down
The table in I1:L12 is for review purposes only and just checking everything matches up with prize allocated to player in Column C
Formula in J2:K12 is very!! long winded but does the job - Cells in formula obviously adjusted for each different cell - very time consuming as could not drag formula
=IF($H$2=1,DATA!BB18,IF($H$2=2,DATA!BH18,IF($H$2=3,DATA!BN18,IF($H$2=4,DATA!BT18,IF($H$2=5,DATA!BZ18,IF($H$2=6,DATA!CF18,IF($H$2=7,DATA!CL18,IF($H$2=8,DATA!CR18,IF($H$2=9,DATA!CX18,IF($H$2=10,DATA!DD18,IF($H$2=11,DATA!DJ18,IF($H$2=12,DATA!DP18,IF($H$2=13,DATA!DV18,IF($H$2=14,DATA!EB18,IF($H$2=15,DATA!EH18,IF($H$2=16,DATA!EN18,IF($H$2=17,DATA!ET18,IF($H$2=18,DATA!EZ18,IF($H$2=19,DATA!FF18,IF($H$2=20,DATA!FL18,IF($H$2=21,DATA!FR18,IF($H$2=22,DATA!FX18,IF($H$2=23,DATA!GD18,IF($H$2=24,DATA!GJ18,IF($H$2=25,DATA!GP18,IF($H$2=26,DATA!GV18,IF($H$2=27,DATA!HB18,IF($H$2=28,DATA!HH18,IF($H$2=29,DATA!HN18,IF($H$2=30,DATA!HT18,IF($H$2=31,DATA!HZ18,IF($H$2=32,DATA!IF18,IF($H$2=33,DATA!IL18,IF($H$2=34,DATA!IR18,IF($H$2=35,DATA!IX18,IF($H$2=36,DATA!JD18,IF($H$2=37,DATA!JJ18,IF($H$2=38,DATA!JP18,IF($H$2=39,DATA!JV18,IF($H$2=40,DATA!KB18,IF($H$2=41,DATA!KH18,IF($H$2=42,DATA!KN18,IF($H$2=43,DATA!KT18,IF($H$2=44,DATA!KZ18,IF($H$2=45,DATA!LF18,IF($H$2=46,DATA!LL18,IF($H$2=47,DATA!LR18,IF($H$2=48,DATA!LX18,IF($H$2=49,DATA!MD18,IF($H$2=50,DATA!MJ18,0))))))))))))))))))))))))))))))))))))))))))))))))))
In Cells M1:N500 the formula is - =IF(DATA!MN2=0,"t",IF(DATA!MN2="","t",DATA!MN2))
Basically a look up on worksheet 1 where all the individual tables for prize winners is put into one long table and shows everything for all the prizes won (or not won)
(The reason there is t in some cells is explained below)
As you can see, in Column P, the number of names of each person is displayed the number of unique prizes they have won.
Whew - Anyone else exhausted yet?!
The biggest issue I was having was with columns Q and R - how to find a way to display the prizes that each person had won.
The way I got around it was with correlating all the individual prize tables into one long column and the results displayed in columns M and N
I had planned to simply copy paste these columns and then highlight blank cells and delete, shifting cells up - but of course even though the cells looked blank, they were not (the wonders of excel!)
I was driving myself mad, but solution was simple enough - as in the formula above that was used - =IF(DATA!MN2=0,"t",IF(DATA!MN2="","t",DATA!MN2)) - adding "t" to any blank cells meant I could / can now copy paste (as values) and then push f5, select special, select constants, then untick everything other than text which would allow me to delete every cell that contained a "t" - shifting cells up and BOOM! prize ID's and the number of prizes was now in line with Column P and the names of the prize winners.
Phew!!
It is not exactly pretty, it was not easy but it works