Find 2nd Value in a Row, Return Adjacent Cell

MeditateMan

New Member
Joined
Sep 15, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello, been reading up on the forms and trying different solutions but I am stumped.

I have a row with an NFL Position, and to the right of it the NFL Player's Name. However there are multiple instances of RB and WR.

I need assistance in filling in columns V,X,Y with the 2nd Instance of RB (V), 2nd Instance of WR (X), 3rd Instance of WR (Y) from the same row.

Book2.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAAB
1QBRBRBWRWRWRTEFlexDST
2QBMatt RyanRBNajee HarrisRBSaquon BarkleyFLEXJustin JeffersonWRBrandin CooksWRMichael PittmanWRJahan DotsonTETravis KelceDSTSteelersMatt RyanNajee HarrisBrandin CooksTravis KelceJustin JeffersonSteelers
3QBJameis WinstonRBD'Andre SwiftFLEXSaquon BarkleyRBDameon PierceWRJustin JeffersonWRMichael PittmanWRChristian KirkTETravis KelceDSTLionsJameis WinstonD'Andre SwiftJustin JeffersonTravis KelceSaquon BarkleyLions
4QBTrevor LawrenceRBChristian McCaffreyRBSaquon BarkleyFLEXJustin JeffersonWRChristian KirkWRMarvin JonesWRJahan DotsonTETravis KelceDSTSteelersTrevor LawrenceChristian McCaffreyChristian KirkTravis KelceJustin JeffersonSteelers
5QBJalen HurtsRBChristian McCaffreyRBSaquon BarkleyWRA.J. BrownWRMichael PittmanWRJahan DotsonFLEXTravis KelceTEDallas GoedertDSTVikingsJalen HurtsChristian McCaffreyA.J. BrownDallas GoedertTravis KelceVikings
6QBCarson WentzRBChristian McCaffreyRBSaquon BarkleyWRTerry McLaurinWRMichael PittmanWRChristian KirkFLEXJahan DotsonTETravis KelceDSTFalconsCarson WentzChristian McCaffreyTerry McLaurinTravis KelceJahan DotsonFalcons
7QBPatrick MahomesRBNick ChubbRBSaquon BarkleyWRDJ MooreWRJuJu Smith-SchusterWRChristian KirkTETravis KelceFLEXZach ErtzDSTSteelersPatrick MahomesNick ChubbDJ MooreTravis KelceZach ErtzSteelers
8QBMarcus MariotaRBJonathan TaylorRBSaquon BarkleyWRMichael PittmanWRDrake LondonWRJakobi MeyersFLEXTravis KelceTEKyle PittsDSTSteelersMarcus MariotaJonathan TaylorMichael PittmanKyle PittsTravis KelceSteelers
9QBPatrick MahomesRBJonathan TaylorRBSaquon BarkleyFLEXMarquise BrownWRJuJu Smith-SchusterWRJahan DotsonWRWan'Dale RobinsonTETravis KelceDSTDolphinsPatrick MahomesJonathan TaylorJuJu Smith-SchusterTravis KelceMarquise BrownDolphins
10QBKirk CousinsRBAaron JonesRBSaquon BarkleyWRDavante AdamsWRJustin JeffersonFLEXAdam ThielenWRJahan DotsonTEGerald EverettDSTDolphinsKirk CousinsAaron JonesDavante AdamsGerald EverettAdam ThielenDolphins
11QBJalen HurtsRBJoe MixonRBAaron JonesFLEXSaquon BarkleyWRJustin JeffersonWRParris CampbellWRRomeo DoubsTETravis KelceDSTDolphinsJalen HurtsJoe MixonJustin JeffersonTravis KelceSaquon BarkleyDolphins
12QBPatrick MahomesRBJoe MixonRBSaquon BarkleyFLEXMarquise BrownWRMichael PittmanWRJuJu Smith-SchusterWRRandall CobbTETravis KelceDSTVikingsPatrick MahomesJoe MixonMichael PittmanTravis KelceMarquise BrownVikings
13QBKirk CousinsRBAaron JonesRBSaquon BarkleyFLEXJustin JeffersonWRMichael PittmanWRAdam ThielenWRJahan DotsonTETravis KelceDSTGiantsKirk CousinsAaron JonesMichael PittmanTravis KelceJustin JeffersonGiants
Sheet1
Cell Formulas
RangeFormula
T2:T13T2=B2
U2:U13U2=INDEX(A2:Q2,MATCH("RB",A2:R2,0)+1)
Z2:Z13Z2=INDEX(A2:Q2,MATCH("TE",A2:R2,0)+1)
AA2:AA13AA2=INDEX(A2:Q2,MATCH("FLEX",A2:R2,0)+1)
AB2:AB13AB2=R2
W2:W13W2=INDEX(A2:Q2,MATCH("wr",A2:R2,0)+1)
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
How about
Fluff.xlsm
ABCDEFGHIJKLMNOPQRS
1
2QB Matt Ryan RB Najee Harris RB Saquon Barkley FLEX Justin Jefferson WR Brandin Cooks WR Michael Pittman Jr. WR Jahan Dotson TE Travis Kelce DST SteelersQB Matt RyanRB Najee HarrisRB Saquon BarkleyFLEX Justin JeffersonWR Brandin CooksWR Michael Pittman Jr.WR Jahan DotsonTE Travis KelceDST Steelers
3QB Jameis Winston RB D'Andre Swift FLEX Saquon Barkley RB Dameon Pierce WR Justin Jefferson WR Michael Pittman Jr. WR Christian Kirk TE Travis Kelce DST Lions QB Jameis WinstonRB D'Andre SwiftFLEX Saquon BarkleyRB Dameon PierceWR Justin JeffersonWR Michael Pittman Jr.WR Christian KirkTE Travis KelceDST Lions
4QB Trevor Lawrence RB Christian McCaffrey RB Saquon Barkley FLEX Justin Jefferson WR Christian Kirk WR Marvin Jones Jr. WR Jahan Dotson TE Travis Kelce DST Steelers QB Trevor LawrenceRB Christian McCaffreyRB Saquon BarkleyFLEX Justin JeffersonWR Christian KirkWR Marvin Jones Jr.WR Jahan DotsonTE Travis KelceDST Steelers
5QB Jalen Hurts RB Christian McCaffrey RB Saquon Barkley WR A.J. Brown WR Michael Pittman Jr. WR Jahan Dotson FLEX Travis Kelce TE Dallas Goedert DST Vikings QB Jalen HurtsRB Christian McCaffreyRB Saquon BarkleyWR A.J. BrownWR Michael Pittman Jr.WR Jahan DotsonFLEX Travis KelceTE Dallas GoedertDST Vikings
6QB Carson Wentz RB Christian McCaffrey RB Saquon Barkley WR Terry McLaurin WR Michael Pittman Jr. WR Christian Kirk FLEX Jahan Dotson TE Travis Kelce DST Falcons QB Carson WentzRB Christian McCaffreyRB Saquon BarkleyWR Terry McLaurinWR Michael Pittman Jr.WR Christian KirkFLEX Jahan DotsonTE Travis KelceDST Falcons
Input
Cell Formulas
RangeFormula
B2:S6B2=LET(txt,DROP(TRIM(TEXTSPLIT(A2,{"QB","RB","WR","TE","FLEX","DST"})),,1),DROP(REDUCE("",txt,LAMBDA(a,b,HSTACK(a,TEXTAFTER(TEXTBEFORE(" "&A2,b,,,,"")," ",-2),b))),,1))
Dynamic array formulas.
 
Upvote 0
Slight tweak to get rid of the trailing spaces.
Excel Formula:
=LET(txt,DROP(TEXTSPLIT(A2,{"QB","RB","WR","TE","FLEX","DST"}),,1),DROP(REDUCE("",txt,LAMBDA(a,b,TRIM(HSTACK(a,TEXTAFTER(TEXTBEFORE(" "&A2,b,,,,"")," ",-1),b)))),,1))
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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