May 12, 2021
Please, see the attached picture. I've tried to explain what I'm trying to do. But I'm stuck.
1) I want the first table (named "S_RS") to show the correct win-loss record (W-L) (in the column named "W-L") for each starting pitcher for the Boston Red Sox in the 2021 MLB regular season. The first table summarizes the data in the second table below. The second table is named "GL_RS".
2) I have tried to use the XLOOKUP-function but it will only return the last or next to last input. The formula I have used is the following:
=xlookup(S_RS[@[Starting pitchers]],GL_RS[Starting pitcher],GL_RS[W-L],””,1,-1)
But as you can see for example for Eovaldi in his last two games (game 37 and 32) he didn't get a decision (win or loss for his team since one of the relive pitchers earned it). I want the formula to find Eovaldi's last game (game 37), check for a decision (W or L) and if there is none, then look for the last time he earned a decision (here: game 27 and return 4-2).
I hope someone out there knows the solution.
December 7, 2016
As this is your first post you might have missed the forum rules, but as stated you should add a sample workbook instead of a picture, this is probably the main reason to why no one has answered to your post already.
Attach your workbook containing the data and/or macro you are having an issue with. I can't stress this enough. Don't type in lots of data or code. We don't have time to recreate the workbooks.
With that said, if you can upload a sample workbook we can play around and hopefully find a working solution.