My apologies if this has been asked before. I did try and search for a resolution but I was unsuccessful in finding one for the exact problem I am experiencing.
Some background:
I'm currently using the solver add-in to optimize a daily fantasy baseball lineup based on a statistical analysis of batter vs. pitcher matchups and individual performance over the past 14 days. In order to do this, I need each position to be identified by a unique string of text (not sure if there is a better way to do it). The only position that this really matters is for the OF positions, since this is the only position that has multiple players in it at any given time. Basically what I'm trying to do is is this:
I was able to find a function that performed the above code block, but only performed the first two if functions (Checked for *1 and if true assigned *2, if not assigned *1). Below is what I edited the function to in an attempt to get it to resolve the way I would like, however it does not seem to be working. It is returning a value not available error.
I'd truly appreciate any assistance in getting this to function properly. I've attached the spreadsheet with which I am working below. The formula in question is being used in the M column of the Lineup Solver tab (it should be highlighted upon opening the file).
MLB BvP and Last14 Analysis - copy fg names test backup ef.xlsm
Bookmarks