Perform function by groups

mikesal57

Board Regular
Joined
Jul 6, 2011
Messages
193
Office Version
  1. 2016
Platform
  1. Windows
Hi ALL...

How can I do a function (RANK) within groups separated by blank rows?

DatePostTrackRacenumPrgHorseMLcFTcF4cHFcRtgPSRCPwPointsRANK
3/23/1910:30AQU11Blue Pigeon1594249067787239.675.64-1.2-3.68.7126.523.6
3/23/1910:30AQU12Borsa Vento41003710172959746.626-1.85-4.049.3632.34.85
3/23/1910:30AQU13Domain81014511074929645.116.06-2.25-4.49.6231.284.8
3/23/1910:30AQU14Kenyan158819463808541.115.28-0.05-3.768.1927.24.25
3/23/1910:30AQU15Rogue Nation0.61151361108610410847.646.9-6.8-4.411.1835.365.4
3/23/1910:30AQU16Orpheus (ARG)3.59319869879044.665.58-0.05-3.928.9729.584.5
3/23/1911:03AQU21Claire's Kitty1.48119262656534.544.86-0.05-3.688.0622.13.25
3/23/1911:03AQU22Midnight Crossing107719560596131.684.62-0.05-3.87.820.063.05
3/23/1911:03AQU23Midnight Sky3.57619360626232.774.56-0.05-3.727.821.083.1
3/23/1911:03AQU24Third Card Down87318957545329.194.38-0.05-3.567.4118.362.65
3/23/1911:03AQU25Dazzling Speed2.57119261675934.194.26-0.05-3.687.9322.782.95
3/23/1911:03AQU26Diamond Jen Brady68019861626032.844.8-0.05-3.927.9321.083
3/23/1911:40AQU31Judge Stanton36617755605030.883.96-0.05-3.087.1520.42.5
3/23/1911:40AQU32Invest2.57017658677635.234.2-0.05-3.047.5422.783.8
3/23/1911:40AQU33Golconda107418360626333.14.44-0.05-3.327.821.083.15
3/23/1911:40AQU34Givetheman a Cigar4.586110367777539.635.16-0.05-4.128.7126.183.75
3/23/1911:40AQU35Bad Guy88519068758339.945.1-0.05-3.68.8425.54.15
3/23/1911:40AQU36Lorcan67418359554729.794.44-0.05-3.327.6718.72.35
3/23/1911:40AQU37Turbulence5902710063647833.95.4-1.35-48.1921.763.9
3/23/1911:40AQU38Scrutinize207218458606231.954.32-0.05-3.367.5420.43.1

<colgroup><col span="5"><col><col span="17"></colgroup><tbody>
</tbody>


thank you
mike
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi,

In cell P2, you can test the following Array Formula

Code:
=IF(O2="","",RANK(O2,INDIRECT("O"&MAX(IF($O$1:O2="",ROW($O$1:O2)))+1):INDIRECT("O"&MATCH(TRUE,ISBLANK(A3:$A$100),0)+ROW()-1)))

Hope this will help
 
Upvote 0
Code:
DatePostTrackRacenumPrgHorseMLcFTcF4cHFcRtgPSRCPwPointsRANK
3/23/1910:30AQU11Blue Pigeon1594249067787239.67#N/A5.64-1.2-3.68.7126.523.6
3/23/1910:30AQU12Borsa Vento41003710172959746.62#N/A6-1.85-4.049.3632.34.85
3/23/1910:30AQU13Domain81014511074929645.11#N/A6.06-2.25-4.49.6231.284.8
3/23/1910:30AQU14Kenyan158819463808541.11#N/A5.28-0.05-3.768.1927.24.25
3/23/1910:30AQU15Rogue Nation0.61151361108610410847.64#N/A6.9-6.8-4.411.1835.365.4
3/23/1910:30AQU16Orpheus (ARG)3.59319869879044.66#N/A5.58-0.05-3.928.9729.584.5
3/23/1911:03AQU21Claire's Kitty1.48119262656534.54#N/A4.86-0.05-3.688.0622.13.25
3/23/1911:03AQU22Midnight Crossing107719560596131.68#N/A4.62-0.05-3.87.820.063.05
3/23/1911:03AQU23Midnight Sky3.57619360626232.77#N/A4.56-0.05-3.727.821.083.1
3/23/1911:03AQU24Third Card Down87318957545329.19#N/A4.38-0.05-3.567.4118.362.65
3/23/1911:03AQU25Dazzling Speed2.57119261675934.19#N/A4.26-0.05-3.687.9322.782.95
3/23/1911:03AQU26Diamond Jen Brady68019861626032.84#N/A4.8-0.05-3.927.9321.083

<tbody>
</tbody>
 
Last edited:
Upvote 0
For an Array Formula ...

Instead of the Enter key ...

You need to use simultaneously the three keys : Control Shift Enter

Hope this clarifies
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,664
Members
449,045
Latest member
Marcus05

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