Trying to get a formula to show last 5 most recent text values in a column corresponding to a name

SW82SW

New Member
Joined
Feb 10, 2025
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am trying to find a formula that would look through all results in a column that correspond to a name in another column and have it show me the last 5 results for each person. I need results that show "Y" to be shown as "W", "N" to show as "L" and "V" to remain as "V" (W, L, or V). This list will grow over time so I need a formula that continues to only select the 5 most recent results.

I can't use XL2BB so I have attached a small table with an example of my data and a copy of what I would like. I have tried the following formula but it only shows the first letter for in each cell ("W") rather than what the last 5 results have been

PHP:
=
CHOOSE(1+
  IFERROR(
    MOD(
      LARGE(
        +($B$1:$B1=B2)*(100*ROW($D:$D)+3*($D1:$D$1="Y")+2*($D1:$D$1="N")+1*($D1:$D$1="V")),
        {5,4,3,2,1}
      ),
      100
    ),
    0
  ),
  "W","L","V"
)



Game weekTipperSelectionResult
1BrianAY
1MatthewBN
1JonCY
2BrianDN
2MatthewBN
2JonSY
3BrianTY
3MatthewAN
3JonBY
4BrianRY
4MatthewTV
4JonCN
5BrianCY
5MatthewDY
5JonAY

I would ideally like to output either of the below (one cell answer preferred)


TipperForm
BrianW, W, W, L, W
MatthewW, V, L, L, L
JonW, L, W, W, W

TipperForm
BrianWWWLW
MatthewWVLLL
JonWLWWW

Thanks guys.
 
@Cubist apologies to open this up again, but how would I adjust the formula you gave me to output the form across 5 cells? I think this might look better as I would be able to use conditional formatting to colour the cells depending on the outcome.

Thanks again.
 
Upvote 0
Try:
Book1
MNOPQRSTUVW
1
2
3
4
5
6
7
8
9
10Game weekTipperSelectionResultTipperForm1Form2Form3Form4Form5
111BrianAYBrianWLWWW
121MatthewBNMatthewLLLV 
131JonCYJonWWWLL
142BrianDN
152MatthewBN
162JonSY
173BrianTY
183MatthewAN
193JonBY
204BrianRY
214MatthewTV
224JonCN
235BrianCY
245MatthewDP
255JonAN
Sheet9
Cell Formulas
RangeFormula
S11:S13S11=IFERROR(XLOOKUP(INDEX(TAKE(FILTER($P$11:$P$25,($N$11:$N$25=[@Tipper])*($P$11:$P$25<>"P")),-5),1),{"Y","N","V"},{"W","L","V"}),"")
T11:T13T11=IFERROR(XLOOKUP(INDEX(TAKE(FILTER($P$11:$P$25,($N$11:$N$25=[@Tipper])*($P$11:$P$25<>"P")),-5),2),{"Y","N","V"},{"W","L","V"}),"")
U11:U13U11=IFERROR(XLOOKUP(INDEX(TAKE(FILTER($P$11:$P$25,($N$11:$N$25=[@Tipper])*($P$11:$P$25<>"P")),-5),3),{"Y","N","V"},{"W","L","V"}),"")
V11:V13V11=IFERROR(XLOOKUP(INDEX(TAKE(FILTER($P$11:$P$25,($N$11:$N$25=[@Tipper])*($P$11:$P$25<>"P")),-5),4),{"Y","N","V"},{"W","L","V"}),"")
W11:W13W11=IFERROR(XLOOKUP(INDEX(TAKE(FILTER($P$11:$P$25,($N$11:$N$25=[@Tipper])*($P$11:$P$25<>"P")),-5),5),{"Y","N","V"},{"W","L","V"}),"")
 
Upvote 0
Not a great deal of difference but if you want you could try this slightly shorter one.

SW82SW_1.xlsm
NPQRSTUVW
10TipperResultTipperForm1Form2Form3Form4Form5
11BrianYBrianWLWWW
12MatthewNMatthewLLLV 
13JonYJonWWWLL
14BrianN
15MatthewN
16JonY
17BrianY
18MatthewN
19JonY
20BrianY
21MatthewV
22JonN
23BrianY
24MatthewP
25JonN
Sheet3
Cell Formulas
RangeFormula
S11:S13S11=MID("WLV",IFERROR(FIND(INDEX(TAKE(FILTER(P$11:P$25,(N$11:N$25=[@Tipper])*(P$11:P$25<>"P")),-5),1),"YNV"),4),1)
T11:T13T11=MID("WLV",IFERROR(FIND(INDEX(TAKE(FILTER(P$11:P$25,(N$11:N$25=[@Tipper])*(P$11:P$25<>"P")),-5),2),"YNV"),4),1)
U11:U13U11=MID("WLV",IFERROR(FIND(INDEX(TAKE(FILTER(P$11:P$25,(N$11:N$25=[@Tipper])*(P$11:P$25<>"P")),-5),3),"YNV"),4),1)
V11:V13V11=MID("WLV",IFERROR(FIND(INDEX(TAKE(FILTER(P$11:P$25,(N$11:N$25=[@Tipper])*(P$11:P$25<>"P")),-5),4),"YNV"),4),1)
W11:W13W11=MID("WLV",IFERROR(FIND(INDEX(TAKE(FILTER(P$11:P$25,(N$11:N$25=[@Tipper])*(P$11:P$25<>"P")),-5),5),"YNV"),4),1)
 
Upvote 0

Forum statistics

Threads
1,226,840
Messages
6,193,277
Members
453,788
Latest member
drcharle

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