Active Member
December 30, 2020
Hi All,
Not sure if anyone can help with the attached file, basically I've got stuck with a complicated code I'm writing and also need some help with colour counting conditionally formatted cells, not sure if the latter is even possible!
The file is attached with a tab where I have explained the problem in more detail.
Best of luck with this one and Happy New Year!
Peter
July 16, 2010
Hi Peter,
To answer your first question "I think the code in column T is working but cannot get it to obey rule B; If the player scores about 36 but does not win, the above rules do not apply and their handicap remains untouched", you can modify your formula like so:
=IF((AND(ISNUMBER(R3),R3<31,P3<Q3,R3=$R$34)),1,IF(R3=$R$35,1,IF(R3=37,-1,IF(R3=38,-2,IF(R3=39,-2,IF(R3>39,-3,""))))))
In regards to counting the number of times a player comes last or first, your data layout isn't conducive to this formula because it's not in a tabular layout. You can use COUNTIF, but you'd have to manually update the formula each time you add another week to add another COUNTIF for that week's results e.g.:
=COUNTIF(R3:R32,$R$35)+COUNTIF(Z3:Z32,$Z$35)+COUNTIF(AH3:AH32,$AH$35)
In regards to the conditional formatting, again this is a side effect of the data layout. There's no simpler way than to create two rules for each week, sorry.
Hope that helps.
Mynda
Active Member
December 30, 2020
Hi Mynda,
Thanks for the quick response, very helpful, did get the win/losses count working, it is a manual exercise but I will build out a full year view of the spreadsheet and that will resolve the need for a manual addition (eventually!).
Still no luck with my rule B. I've highlighted a couple of examples (yellow) and added a comment. It may well be that I am asking too much of the code in a single instruction, if there is a work around for this, even using hidden columns, that will do.
Much appreciated,
Peter
July 16, 2010
Hi Peter,
In row 6 of your notes it says if a player scores 37 they have a point deducted, and you have factored this into your formula:
=IF((AND(ISNUMBER(R3),R3<31,P3<Q3,R3=$R$34)),1,IF(R3=$R$35,1,IF(R3=37,-1,IF(R3=38,-2,IF(R3=39,-2,IF(R3>39,-3,""))))))
Similarly, if they score 38 they have two points deducted:
=IF((AND(ISNUMBER(R3),R3<31,P3<Q3,R3=$R$34)),1,IF(R3=$R$35,1,IF(R3=37,-1,IF(R3=38,-2,IF(R3=39,-2,IF(R3>39,-3,""))))))
If you want a second criteria for winning, you need this formula:
=IF((AND(ISNUMBER(R3),R3<31,P3<Q3,R3=$R$34)),1,IF(R3=$R$35,1,IF(AND(R3=$R$34,R3=37),-1, IF(AND(R3=$R$34,R3=38),-2,IF(R3=39,-2,IF(R3>39,-3,""))))))
Mynda
Active Member
December 30, 2020
Hi Mynda,
Apologies for the long delay, I've been battling COVID for most of January, horrendous!
Thanks again for your very quick responses, this does seem rather trivial, Im sure I'll have some serious work code problem for you one day.
I'll play around with this and see if it works,
Thanks again,
Peter
1 Guest(s)