Results list problem

Davout

New Member
Joined
Jan 30, 2016
Messages
9
Hi everybody!

In my spare time, I'm doing whatever I can to help out at our local skiing clubs' "youngster department" and since I have a slight movement disability, doing the numbers and results is what I volunteered to do. Now I would desperately want to streamline the excel sheet we have, which really isn't much of a sheet at all as we have to put in every single digit by hand *and* do all the calculations with a calculator. All in all, it makes for lots of errors.

The situation:

We have a number of competitors. The winner will get 20 points ("position points"), the runner up will get 18, the third placed will get 16 and so on down to the 10th placed who will receive 2 points. Below the tenth position, there will be no "position points" awarded. But in addition to this, each competitor will receive 1 point for every competitor beaten ("competitor points"), but only for just that. This means, that if two persons end up at the same position, they will not receive any points for the one at the same position but only for
those below in points.


Example 1: 50 competitors. The winner will receive 20pp + 49cp = 69 points in total. The runner up will receive 18pp + 48cp = 66 points in total. Etc down to the one at position #49 who will receive 1 point in total.


Example 2: 50 competitors here as well, but here the 3 persons at the top are tied. They will each receive 20pp, but will only receive 47cp as they have only beaten 47 competitors each = 67 points in total. The one at 4th place will receive 14pp + 46cp = 60 points in total.


Every competitor have one row each (the usual way, name to the left, club, sex, age etc in the adjacent cells to the right). Of course, I don't know in beforehand who will win and the column with their respective final positions will be completely random. Since there will be quite a few competitors in each race and further, several races in the year, I want to be able to minimize the "human input" to only entering the number of contestants and the final position for each. Earlier we have entered all the numbers by hand and it have always ended up with errors and more than just a bit of hard words, accusations and so on. Which is rather sad since this, like I said, is all done free of charge on our spare time.

The problem:

Whenever two or more competitors end up in the same position, every way of writing this that I have tried so far, fails. The code must take into account that there can be people ending up in the same position all over the place, ie. 1-3, 8-9 or 34-38 or whatever.

I've tried nested IF-statements for the eventuality that two or more persons end up at the same position but with up to 70 competitors it quickly becomes a mess. Surely there must be a better way doing this. If somebody could point me in the right direction, I'd be grateful! :)

I hope I have explained things clearly!

Thank you in advance, sorry for any typos and bad grammar as english is not my first language.

Best Regards! / Dav
 
I'm thinking that Marcel's formula might need the following tweak as i think it will be copied down the worksheet
Then this should do:
Code:
=COUNTIF('Total Boys'!F$9:F$69;">"&'Total Boys'!F9)+IF('Total Boys'!F[COLOR="#FF0000"][B]$[/B][/COLOR]7<6;COUNTIF('Total Girls'!F$9:F$69;">"&'Total Boys'!F9))


Dav, what is the name of the worksheet that this formula is placed in?
 
Last edited:
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi guys!

Thanks again for your help, much (!) appreciated.

The name of the worksheet is simply "results list 2016".

Your suggestion(s) would've worked beautifully but I had understood it a bit wrong originally. The rules are, that if there are less than 6 competitors of *either* boys OR girls, they will race together and shall have their points calculated accordingly. For example, if there are 5 boys and 9 girls, they will still not be racing gender wise but together. I think this is a very stupid setup but the-powers-that-be have so decided...

Thus, the formula somehow must take into account not only whether or not there are >6 boys skiing but also check for the same thing for the girls and then, using some kind of "OR" formula (I assume?) for those four conditions and make the calculations based upon that. Now, instead of just asking you guys to do it for me, since I actually enjoy doing this - especially when the code I've typed in turns out the result I want ;) - and the best way to actually learn something is to get your hands on it, I had a go at it myself using your code and adding my own gibberish to it. It *seems* to work. But I haven't yet had time to properly error check it. Here's what I came up with:

=IF(OR('Total Boys'!F$7<6;'Total Girls'!F$7<6;AND('Total Boys'!F$7<6;'Total Girls'!F$7>=6);AND('Total Girls'!F$7<6;'Total Boys'!F$7>=6));COUNTIF('Total Boys'!F$9:F$69;">"&'Total Boys'!F9)+IF('Total Boys'!F$7<6;COUNTIF('Total Girls'!F$9:F$69;">"&'Total Boys'!F9))+IF('Total Girls'!F$7<6;COUNTIF('Total Boys'!F$9:F$69;">"&'Total Girls'!F9));COUNTIF('Total Boys'!F$9:F$69;">"&'Total Boys'!F9))

If this works as hoped for, I'll just copy it down the sheets and be done! What do you think? Can it be made more efficient and shortened? If I get asked to add something more to it I will pretend temporary insanity ;)

All the best! / Dav
 
Upvote 0
My suggestion is to take the formula from post #11 as a basis and adjust to:
Code:
=COUNTIF('Total Boys'!F$9:F$69;">"&'Total Boys'!F9)+IF(OR('Total Boys'!F$7<6;'Total Girls'!F$7<6);COUNTIF('Total Girls'!F$9:F$69;">"&'Total Boys'!F9))

In your formula, the checks:
AND('Total Boys'!F$7<6;'Total Girls'!F$7>=6);AND('Total Girls'!F$7<6;'Total Boys'!F$7>=6)
are superfluous as these are already covered by:
OR('Total Boys'!F$7<6;'Total Girls'!F$7<6)
 
Upvote 0
Indeed, you are correct. Those two AND's were superfluous. But the variation of the formula that you suggested didn't work so I changed it to this:

=IF(OR('Total Boys'!G$8<6;'Total Girls'!G$8<6);COUNTIF('Total Boys'!G$10:G$69;">"&'Total Boys'!G10)+COUNTIF('Total Girls'!G$10:G$69;">"&'Total Boys'!G10);COUNTIF('Total Boys'!G$10:G$69;">"&'Total Boys'!G10))

Now everything works fine except for one issue: Whenever there is a kid that don't finish a race, he/she will get a "0" in his/her results sheet. This should give him/her 0 points but currently, since the check only looks at how many higher valued numbers there are in the specified column, it will result in 4 points if there are 5 competitors etc.

I'm already bowing to the floor in thanks of your astounding help, so if you've grown tired of it I fully understand.

All the best! / Dav
 
Upvote 0
Just add a check around your formula for G10 = 0:
=IF('Total Boys'!G10=0;0;YourFormula)

So the entire formula will be:
=IF('Total Boys'!G10=0;0;IF(OR('Total Boys'!G$8<6;'Total Girls'!G$8<6);COUNTIF('Total Boys'!G$10:G$69;">"&'Total Boys'!G10)+COUNTIF('Total Girls'!G$10:G$69;">"&'Total Boys'!G10);COUNTIF('Total Boys'!G$10:G$69;">"&'Total Boys'!G10)))
 
Upvote 0
Thank you very much for your answer!

It's a bit harder though, since the program will need to check in both genders' columns and do the same checks in both, ie check how many is beaten and how many is "zeroed". For example, if there are four boys and seven girls, and one boy and two girls don't finish, the winner should still get (4+11)-1=10 points and the ones not finishing should have 0 in their placement columns as well as 0 points.
 
Upvote 0
You can't modify the formulas for placement and points similarly: =IF('Total Boys'!G10=0;0;YourFormula)?
 
Upvote 0
Well I tried to, using your suggestion, like this:

=IF('Total Girls'!G10=0;0;IF(OR('Total Girls'!G$8<6;'Total Boys'!G$8<6);COUNTIF('Total Girls'!G$10:G$69;">"&'Total Girls'!G10)+COUNTIF('Total Boys'!G$10:G$69;">"&'Total Girls'!G10);COUNTIF('Total Girls'!G$10:G$69;">"&'Total Girls'!G10)))

This *does* give the person not finishing a 0 just like it should, but the competitors that actually have finished the race should have points for beating even the ones not finishing (since they have taken part in the race).
 
Upvote 0
Please share the information so I can reconstruct your workbook and follow along.
It has 2 worksheets 'Total Boys' and 'Total Girls' or are there any more?
All relevant data is in row 10:69 (except number of competitors which is in G8)?
In which columns are:
- Times
- Position
- Position Points
- Competotors Points
- Total points

Any other relvant information I should need to know to reconstruct your workbook.
 
Last edited:
Upvote 0
Incredible that you even want to try so thanks once more!


Ok, I'll try to be as clear and precise as possible:


There are 4 worksheets. One each for Boys/Girls with races where each race have one column for placement and one for points. Names of the competitors are to the left, in descending rows, as per usual. These two sheets are easy and works fine. Then there are one sheet for each gender with calculations, so in total four worksheets.


Correct, the number of competitors are in G8, H8, etc and I don't anticipate there will ever be more than 60 competitors per gender so 10:69 is the number of cells. For each race, of course.


About times, much to my chagrin, racetimes will only play a secondary role (don't ask...idiotic!) so the key points are the rest that you listed, position, position points, number of beaten competitors (competitors points) and total points. Plus a "Grand Total" for the five best races during the season but that ones simple as well and of no problem.


Now I have tried to use a simple


COUNTIF('Total Girls'!G10G69;"=0") (in a separate cell of its own which I then thought to use in the formula below)


and this returns the correct number of zeroes, whatever it may be. But I can't really figure out how to incorporate it into my competitors points formula:


=IF('Total Girls'!G10=0;0;IF(OR('Total Girls'!G$8<6;'Total Boys'!G$8<6);COUNTIF('Total Girls'!G$10:G$69;">"&('Total Girls'!G10))+COUNTIF('Total Boys'!G$10:G$69;">"&('Total Girls'!G10));COUNTIF('Total Girls'!G$10:G$69;">"&'Total Girls'!G10))


so that I end up with something that looks like:


Check for number of beaten competitors--->check for number of non-finishing competitors if any--->adding the first to the second = correct placement and placement points


I've tried differnet approaches but keep getting screamed at by Excel...
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

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