Finding the middle number

Marvo

Board Regular
Joined
Nov 27, 2023
Messages
225
Office Version
  1. 2021
Platform
  1. Windows
Hi, can anyone come up with a formula I could place in C76 that would give me the mid point between a set of numbers? At the moment I'm doing it manually and sometimes I forget..

What I need is to spilt the numbers as evenly as possible in Column D into two groups, either high or low dependant on the mid point. I tried adding them together and dividing but that doesn't give a correct answer, at least it didn't in the test I ran. In the mini sheet example, 18 in C76 splits the 34 numbers into 17 high and 17 low.

Many thanks.


Barkway Park.xlsm
ABCD
1HOLE
2PLAYERPAR
3S/I
4 Brian ADAMSHigh 
5 Linda ADAMSHigh 
6 Jeff BATTERBEEHigh34
7 Nick BAXTERLow17
8 Chris BENNETTHigh 
9 Richard BROMLEYHigh 
10 Kellie CURTHigh30
11 Sean CURTLow13
12 Rob DAVEYHigh 
13 Paul DERBYSHIREHigh19
14 Rob DONNELLYLow15
15 Nic DOWNERHigh 
16 Bob FORDELow17
17 Darryl FORNESHigh20
18 Rick GARVEYLow3
19 Dan GELLMANLow10
20 Peter GIBOINHigh 
21 Tony GROUTHigh20
22 David HAMMONDHigh 
23 Mark HARVEYLow13
24 Brian HIMSWORTHLow16
25 Chris HODGESHigh 
26 Shane JENKINSLow17
27 Tony JUNHigh33
28 Andrew KEENLow14
29 Steve KIDDHigh19
30 Mike KNOTTHigh23
31 Darren KOLEKHigh20
32 James KOLEKHigh 
33 Kevin LEECHLow11
34 Steve LEECHHigh19
35 John LEONARDLow8
36 Glenn LEWISHigh 
37 Scott LOOMHigh21
38 Trevor MANKTELOWLow16
39 John MARVESLEYLow16
40 Dan MCCARTHYLow18
41 Andy MCGILLIVRAYHigh22
42 Frank MCKENZIEHigh 
43 Alan MITCHELLHigh 
44 Daniel MOSSHigh 
45 Tony MUNTINGLow18
46 Steve PEARCEHigh35
47 Stewart PEARCEHigh30
48 Keith PYMHigh21
49 Steve ROGERSHigh 
50 Richard SMITHHigh 
51 Steve SMITHHigh22
52 John TAYLORHigh 
53 Gary THORPEHigh 
54 Peter VALENTINEHigh 
55 Martin VANNHigh 
56 Kevin WHARTONHigh 
57 Stuart WILLSLow18
58 Duncan ClarkeHigh 
59 Jim ClewleyHigh 
60 Denis CroninHigh 
61 James CurtHigh 
62 Debbie KolekHigh 
63 Tony MaganaHigh 
64 Stewart McCleanHigh 
65 Martin NoonsHigh 
66 Martin PicklesHigh 
67 Peter SimmondsHigh 
68 Derek WarrenHigh 
69 Ron WeeksHigh34
70 Julian WoodHigh 
71 Simon WoodfordHigh 
72
7334Number of Players
740SKINS17High
756817Low
7618
Master
Cell Formulas
RangeFormula
C4:C71C4=IF(D4:D71<=$C$76,"Low","High")
A1:A3A1="✔"
A4:A71A4=IF(COUNTIF(playlist!$D$6:$D$63,B4)=1,1,0)
D4:D71D4=IF(A4=1,Handicaps!M4,"")
A73A73=SUM(A4:A71)
A74A74=COUNTIF(AQ4:AQ71,">0")
A75A75=COUNT(A4:A71)
C74C74=COUNTIFS($A$4:$A$71,"1",$C$4:$C$71,"High")
C75C75=COUNTIFS($A$4:$A$71,"1",$C$4:$C$71,"Low")
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:AR1,B2:AQ2,B3:AZ3,BB2:BD3,BA1:BE1,BF1:BI3,B4:BI71Expression=ROW()=CELL("row")textNO
A4:A71Other TypeIcon setNO
 
as you are using another sheet to load the values - i can not copy into excel
just get value
 
Upvote 0
Sorry, workbook is quite large. I've copied and changed the numbers to values. Does that help?

Book2
ABCD
40Brian ADAMSHigh
50Linda ADAMSHigh
61Jeff BATTERBEEHigh34
71Nick BAXTERLow17
80Chris BENNETTHigh
90Richard BROMLEYHigh
101Kellie CURTHigh30
111Sean CURTLow13
120Rob DAVEYHigh
131Paul DERBYSHIREHigh19
141Rob DONNELLYLow15
150Nic DOWNERHigh
161Bob FORDELow17
171Darryl FORNESHigh20
181Rick GARVEYLow3
191Dan GELLMANLow10
200Peter GIBOINHigh
211Tony GROUTHigh20
220David HAMMONDHigh
231Mark HARVEYLow13
241Brian HIMSWORTHLow16
250Chris HODGESHigh
261Shane JENKINSLow17
271Tony JUNHigh33
281Andrew KEENLow14
291Steve KIDDHigh19
301Mike KNOTTHigh23
311Darren KOLEKHigh20
320James KOLEKHigh
331Kevin LEECHLow11
341Steve LEECHHigh19
351John LEONARDLow8
360Glenn LEWISHigh
371Scott LOOMHigh21
381Trevor MANKTELOWLow16
391John MARVESLEYLow16
401Dan MCCARTHYLow18
411Andy MCGILLIVRAYHigh22
420Frank MCKENZIEHigh
430Alan MITCHELLHigh
440Daniel MOSSHigh
451Tony MUNTINGLow18
461Steve PEARCEHigh35
471Stewart PEARCEHigh30
481Keith PYMHigh21
490Steve ROGERSHigh
500Richard SMITHHigh
511Steve SMITHHigh22
520John TAYLORHigh
530Gary THORPEHigh
540Peter VALENTINEHigh
550Martin VANNHigh
560Kevin WHARTONHigh
571Stuart WILLSLow18
580Duncan ClarkeHigh
590Jim ClewleyHigh
600Denis CroninHigh
610James CurtHigh
620Debbie KolekHigh
630Tony MaganaHigh
640Stewart McCleanHigh
650Martin NoonsHigh
660Martin PicklesHigh
670Peter SimmondsHigh
680Derek WarrenHigh
691Ron WeeksHigh34
700Julian WoodHigh
710Simon WoodfordHigh
72
7334Number of Players
740SKINS17High
756817Low
7618
Master
Cell Formulas
RangeFormula
C4:C71C4=IF(D4:D71<=$C$76,"Low","High")
A4:A71A4=IF(COUNTIF('[Barkway Park.xlsm]playlist'!$D$6:$D$63,B4)=1,1,0)
A73A73=SUM(A4:A71)
A74A74=COUNTIF(AQ4:AQ71,">0")
A75A75=COUNT(A4:A71)
C74C74=COUNTIFS($A$4:$A$71,"1",$C$4:$C$71,"High")
C75C75=COUNTIFS($A$4:$A$71,"1",$C$4:$C$71,"Low")
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:AR1,B2:AQ2,B3:AZ3,BB2:BD3,BA1:BE1,BF1:BI3,B4:BI71Expression=ROW()=CELL("row")textNO
 
Upvote 0
=IF(D2="","",IF(D2<$C$76,"Low","High"))
C76 = median(D2:D68)

so 18.5 will be HIGH
you can change to use < = to include 18.5 as low



Book2
ABCDE
1#VALUE!Brian ADAMSLow
2#VALUE!Linda ADAMSLow 
3#VALUE!Jeff BATTERBEELow34High
4#VALUE!Nick BAXTERHigh17Low
5#VALUE!Chris BENNETTLow 
6#VALUE!Richard BROMLEYLow 
7#VALUE!Kellie CURTHigh30High
8#VALUE!Sean CURTLow13Low
9#VALUE!Rob DAVEYLow 
10#VALUE!Paul DERBYSHIRELow19High
11#VALUE!Rob DONNELLYHigh15Low
12#VALUE!Nic DOWNERLow 
13#VALUE!Bob FORDELow17Low
14#VALUE!Darryl FORNESLow20High
15#VALUE!Rick GARVEYHigh3Low
16#VALUE!Dan GELLMANLow10Low
17#VALUE!Peter GIBOINLow 
18#VALUE!Tony GROUTLow20High
19#VALUE!David HAMMONDLow 
20#VALUE!Mark HARVEYLow13Low
21#VALUE!Brian HIMSWORTHHigh16Low
22#VALUE!Chris HODGESLow 
23#VALUE!Shane JENKINSHigh17Low
24#VALUE!Tony JUNHigh33High
25#VALUE!Andrew KEENHigh14Low
26#VALUE!Steve KIDDLow19High
27#VALUE!Mike KNOTTLow23High
28#VALUE!Darren KOLEKHigh20High
29#VALUE!James KOLEKLow 
30#VALUE!Kevin LEECHLow11Low
31#VALUE!Steve LEECHHigh19High
32#VALUE!John LEONARDLow8Low
33#VALUE!Glenn LEWISLow 
34#VALUE!Scott LOOMLow21High
35#VALUE!Trevor MANKTELOWHigh16Low
36#VALUE!John MARVESLEYLow16Low
37#VALUE!Dan MCCARTHYLow18Low
38#VALUE!Andy MCGILLIVRAYLow22High
39#VALUE!Frank MCKENZIELow 
40#VALUE!Alan MITCHELLHigh 
41#VALUE!Daniel MOSSHigh 
42#VALUE!Tony MUNTINGHigh18Low
43#VALUE!Steve PEARCELow35High
44#VALUE!Stewart PEARCELow30High
45#VALUE!Keith PYMHigh21High
46#VALUE!Steve ROGERSLow 
47#VALUE!Richard SMITHLow 
48#VALUE!Steve SMITHLow22High
49#VALUE!John TAYLORLow 
50#VALUE!Gary THORPELow 
51#VALUE!Peter VALENTINELow 
52#VALUE!Martin VANNLow 
53#VALUE!Kevin WHARTONLow 
54#VALUE!Stuart WILLSLow18Low
55#VALUE!Duncan ClarkeLow 
56#VALUE!Jim ClewleyLow 
57#VALUE!Denis CroninLow 
58#VALUE!James CurtLow 
59#VALUE!Debbie KolekLow 
60#VALUE!Tony MaganaLow 
61#VALUE!Stewart McCleanLow 
62#VALUE!Martin NoonsLow 
63#VALUE!Martin PicklesHigh 
64#VALUE!Peter SimmondsLow 
65#VALUE!Derek WarrenLow 
66#VALUE!Ron WeeksLow34High
67#VALUE!Julian WoodLow 
68#VALUE!Simon WoodfordHigh 
Sheet1
Cell Formulas
RangeFormula
C1:C68C1=IF(D4:D71<=$C$76,"Low","High")
A1:A68A1=IF(COUNTIF('[Barkway Park.xlsm]playlist'!$D$6:$D$63,B4)=1,1,0)
E2:E68E2=IF(D2="","",IF(D2<$C$76,"Low","High"))
Dynamic array formulas.
 
Upvote 0
Solution
Okay, so it looks like all I had to do was allow a decimal point to the C76 cell. A result of 18.5 (like 18) would split the field in half perfectly but without the decimal point you'd get a return of 19 which wouldn't work. Interesting. Thank you BOTH.
 
Upvote 0

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