Pls help! Expanding range based on a cell value!

adurham22926192

New Member
Joined
Dec 17, 2019
Messages
49
Office Version
  1. 2019
Platform
  1. Windows
I am trying to create a dance scoring software. I have a 3 sheets: Registration, Entry and Adjudicator 1.

Sheet 1 (Registration)
  • In Column A, we have the competitors number (Michael’s number is 101, Joanne’s is 102, etc)
  • In Colmn B, we have their name
  • In Column C, we have the school that they dance for.
ABC
1NumberNameSchool
2101Michael MurphyElite Dance
3102Joanne BrownSheer Talent
4103Tom CookeReegan School of Dance
5104Layla McGuinnessSheer Talent

Sheet 2 (Entry)
  • Here we have the same layout as Sheet 1 but it’s a little different.
  • there are 4 competitors entered and their numbers are still in column A
ABCD
1NumberNameSchoolTotal Number of Competitors
2101Michael MurphyElite Dance=COUNTA(A2:A200)
3102Joanne BrownSheer Talent
4103Tom CookeReegan School of Dance
5104Layla McGuinnessSheer Talent
6
7
8
9

Sheet 3 (Adjudicator 1)
  • On this sheet, I want there To be a formula in D2 that gets changed due to the number of competitors entered.
  • For example, I have 4 competitors entered on Sheet 2 so the formula range would be from row 2 to row 5 but if I added an extra two competitors on Sheet 2, I want the formula to change so that the range would then be from row 2 to row 7.
  • The formula I want to change is this: =SUMPRODUCT((C2<=$C$2:$C$5)/COUNTIF($C$2:$C$5,$C$2:$C$5))
  • The reason why in the formula it is C2:C5 is because there are 4 competitors. When I enter the two extra competitors on the Entry sheet, their number will automatically appear under the other peoples numbers (in this case in cell A6 and A7) and I want the formula that is in D2:D7 expand The range to C2:C7 to include the two extra competitors score in the rank.
ABCD
1NumberScoreConverted scoreRank
210185.5580.00
310292.85100.00
410384.4570.00
510491.3590.00
610573.5550.00
710683.1560.00

Hope this makes sense! All of your help would be appreciated! :)
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi ADurham22926192,

Try
Excel Formula:
=SUMPRODUCT((C2<=OFFSET($C$1,1,,COUNTA($C$2:$C$999)))/COUNTIF(OFFSET($C$1,1,,COUNTA($C$2:$C$999)),OFFSET($C$1,1,,COUNTA($C$2:$C$999))))
 
Upvote 0
Hi ADurham22926192,

Try
Excel Formula:
=SUMPRODUCT((C2<=OFFSET($C$1,1,,COUNTA($C$2:$C$999)))/COUNTIF(OFFSET($C$1,1,,COUNTA($C$2:$C$999)),OFFSET($C$1,1,,COUNTA($C$2:$C$999))))
Thank you! This worked! I’ve another problem:

In Column A, we have the competitors number
In Column B, we have their total points

In Column C and D, i want it to list from highest to lowest who had the most points and to put the matching competitor number in column C

Example: in C2, it should be 102 and in D2 it should be 100 because that competitor is the competitor with the highest score.
Then in C3 and D3, I want it to show the second highest competitor and their score and so on.

The formula I have in C2 is =IF(D5=””,””,INDEX(A:A,AGGREGATE(15,6,ROW(A$2:A$7)/(B$2:B$7=D2),COUNTIF(D$2:D2,D2))))
The formula I have in D2 is =LARGE($B$2:$B$7,ROWS(E$2:E2))
The formula I have in E2 is =SUMPRODUCT((D2<=$D$2:$D$7)/COUNTIF($D$2:$D$7,$D$2:$D$7))

I want all of these formula ranges to expand like my original post so that if more people enter the competition, it will still be able to calculate it. Hope this makes sense!

ABCDE
1NumberTotalNumberTotalRank
210180
3102100
410370
510490
610550
710660
8
 
Upvote 0
I think your C2 example should start IF(D2= ?

I'm not reverse engineering your formulae to check they are correct, just trying to answer your range question, but I believe columns C and D work OK with just a very high number for the top range. For column E try:
Excel Formula:
=SUMPRODUCT((D2<=OFFSET($D$1,1,,COUNTA($D$2:$D$9999)))/COUNTIF(OFFSET($D$1,1,,COUNTA($D$2:$D$9999)),OFFSET($D$1,1,,COUNTA($D$2:$D$9999))))

adurham22921692.xlsx
ABCDE
1NumberTotalNumberTotalRank
2101801021001
3102100104902
410370101803
510490103704
610550106605
710660105506
Sheet1 (2)
Cell Formulas
RangeFormula
C2:C7C2=IF(D2="","",INDEX(A:A,AGGREGATE(15,6,ROW(A$2:A$9999)/(B$2:B$9999=D2),COUNTIF(D$2:D2,D2))))
D2:D7D2=LARGE($B$2:$B$9999,ROWS(E$2:E2))
E2:E7E2=SUMPRODUCT((D2<=OFFSET($D$1,1,,COUNTA($D$2:$D$9999)))/COUNTIF(OFFSET($D$1,1,,COUNTA($D$2:$D$9999)),OFFSET($D$1,1,,COUNTA($D$2:$D$9999))))
 
Upvote 0

Forum statistics

Threads
1,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

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