Fill in Cells by obtaining data from a list of data, most recent data (date) first.

James8761

Board Regular
Joined
Apr 24, 2012
Messages
156
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am a bit stuck on a project for Uni. (similar to yesterday).


The first bit of data below is the data I am looking up.

1588594400356.png


The data will always be sorted by horse, then most recent date first.



I then want to create 3 boxes to show the ‘Score’ a horse achieved.

I’ve inserted the Couse in Cell J1 and the Distance in Cell J2 to act as a lookup. The Horse name to lookup is in Cell I6.

1588594481128.png



The hope being that I can then change these for the thousands of rows I have on the whole dataset.



The first box in Cells I4:N6 I want to just look at the 5 most recent runs and split them in Cell J6, K6, L6, M6 and N6. I’ve manually input the answers for now.

1588594502952.png


The second box in Cells P4:T6 I want to look at the 5 most recent runs at the distance for the Horse (the Distance being 6f as stated in Cell J2). and split them in Cell P6, Q6, R6, S6 and T6. I’ve manually input the answers for now.
1588594527561.png


The third box in Cells V4:Z6 I want to look at the 5 most recent runs at the course and the distance for the Horse (Haydock is the course as stated in Cell J1 and 6f the Distance as stated in Cell J2). and split them in Cell V6, W6, X6, Y6 and Z6. I’ve manually input the answers for now.

1588594547139.png




Does anyone know if it is possible to create a formula rather than doing this manually please?



Thank you for any guidance.
 
It may be beacuse i'm on my works laptop and there is a security layer on it......I'll try on my own laptop tonight.....

Thank you very much for the formula......can I just ask it wouldn't let me use the FILTER function.......just checked my version of Excel and it is now saying Office 365 ProPlus.......is that why the FILTER function won't appear.........it was O365 the last time I checked (admittedly a few months ago!)
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Yup, that's the reason, you wont get the dynamic array functions until (I think) July.
I'll be back shortly.
 
Upvote 0
How about

+Fluff New.xlsm
ABCDEHIJKLMNOPQRSTUVWXYZ
1DateHorseScoreDistanceCourseHaydock
2Hopeless556fHaydock6f
3Hopeless476fLingfield
4Hopeless497fLingfield
5Hopeless345fKemptonLast 5Last 5 distanceLast distance & course
6Hopeless355fBathHopeless554749343555475920585520642243
7Hopeless596fBath
8Hopeless206fHaydock
9Hopeless586fLeicester
10Hopeless616fKempton
11Hopeless566fLingfield
12Hopeless225fBath
13Hopeless415fKempton
14Hopeless635fKempton
15Hopeless605fLeicester
16Hopeless396fLeicester
17Hopeless696fBath
18Hopeless646fHaydock
19Hopeless226fBrighton
20Hopeless685fBrighton
21Hopeless385fBrighton
22Hopeless465fBrighton
23Hopeless595fBrighton
24Hopeless226fHaydock
25Hopeless505fLingfield
26Hopeless436fHaydock
27Glory356fHaydock
28Glory516fLingfield
29Glory537fLingfield
30Glory335fKempton
31Glory345fBath
32Glory626fBath
Master
Cell Formulas
RangeFormula
J6:N6J6=INDEX($C$2:$C$40,AGGREGATE(15,6,(ROW($C$2:$C$40)-ROW($C$2)+1)/($B$2:$B$40=$I$6), COLUMNS($J6:J6)))
P6:T6P6=INDEX($C$2:$C$40,AGGREGATE(15,6,(ROW($C$2:$C$40)-ROW($C$2)+1)/(($B$2:$B$40=$I$6)*($D$2:$D$40=$J$2)), COLUMNS($P6:P6)))
V6:Z6V6=INDEX($C$2:$C$40,AGGREGATE(15,6,(ROW($C$2:$C$40)-ROW($C$2)+1)/(($B$2:$B$40=$I$6)*($D$2:$D$40=$J$2)*($E$2:$E$40=$J$1)), COLUMNS($V6:V6)))
 
Upvote 0
Excellent......thanks so much for your time......the formula(s) do exactly as I want..
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,728
Members
452,939
Latest member
WCrawford

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