I have imported some MLB data and I'm trying to clean it up and organize the data. I am attempting to build a very rudementary model for predicting Pitcher Strikeouts. I'm new to using formulas in google sheets and all that, just trying to educate myself through something i'm interested in (MLB STATS)
When I import the data from MLB.com it comes in with the team names funky, and with numbers. So i created another column and did a REGEXEXTRACT and used all the team names to extract just the name of the team. That part is working. But now I'm trying to do a VLOOKUP and reference the controls sheet, to have the cell return the teams abbreviation. It's returning N/A. however if i delete the formula and manually type in "San Francisco Giants" the formula works and returns the abbreviation. it's cell A2 on the "team stats" sheet.
I've searched everywhere and read a ton of stuff. I am probably missing something stupid here.
If there's an easier way to clean that cell i'm also ok with that solution. I'm just trying to learn as i go for what i want to do.
link to sheet https://docs.google.com/spreadsheets/d/1oGSTWIUNXYFZT8suPR6SmnPrR58TYW13t7vrj2iK1Ik/edit?usp=sharing
I would like to get the abbreviation for the team to return in cell A2 from the result of the REGEXEXACT function in cell B2. It's saying "Did not find value"
You may try this in Cell A2
of Team Stats
=index(xlookup(ifna(regexextract(C2:C,"\n([A-Z].*[a-z])[A-Z]")),Controls!A:A,Controls!B:B,))