Aug 01 2017
09:48 PM
- last edited on
Jul 25 2018
09:52 AM
by
TechCommunityAP
Aug 01 2017
09:48 PM
- last edited on
Jul 25 2018
09:52 AM
by
TechCommunityAP
Hello to anyone who can help. I currently face a problem with my excel worksheet. I am trying to figure this out but to no avail so far. I'll explain the problem and then attach an image. ***IF Corey Seager IS FACING a LEFTY, then RETURN one value, OTHERWISE RETURN other value***
The fact of the matter is I need this done for each hitter. I realize once I get the first function in there it will be easy but I cannot figure this out. The hitters can either be facing a "righty" or a "lefty." Depending on which one they face, a certain value that I have located on another page will be returned.
Any help would be great.
Thank you
Aug 01 2017 10:53 PM
Hi John,
you can use the following formula in cell K2
=IF($G2="Left","ReplaceWithYourLeftyValue","ReplaceWithYourRightyValue")
Once you have put it there, you can copy it down to the other cells in the row.
This assumes that you your Righty and Lefty values are not player specific. In case they are player specific, you would need to use INDEX/MATCH to lookup the values for each player. Please let me know if this the case, and I will send you an updated formula.
If you find my answer useful and like it, I would appreciate you clicking the 'Like' button :)
Regards
Yury
Aug 01 2017 11:00 PM
Hi John,
If the values to be returned are in a different sheet sitting one below the other (i.e., in two rows) and are based on just LEFT pr RIGHT values in column G then you can do a VLOOKUP. Assuming that you need to have the returned values in column K, place the below formula with necessary changes in cell K2:
VLOOKUP(G2, lookupSheetName!$A$1:$B:$2, 2, FALSE)
Here:
After this, just copy the formula and paste it down the column until you need it.
Hope that helps..!!
Aug 02 2017 12:02 AM
Hello Yury,
I will need to use the INDEX/MATCH function because the values are player specific. If you can update the formula that would be awesome.
Thank you,
John
Aug 02 2017 12:17 AM
SolutionHi John,
if your lookup data is in sheet named 'Lookup', and you have names in the range A2:A30, Lefty values in the range B2:B30, and Righty values in the range C2:C30, then your formula in the cell K2 of the 'New Hitters' sheet would be
=IF($G2="Left",INDEX(Lookup!$B$2:$B$30,MATCH($A2,Lookup!$A$2:$A$30,0)), INDEX(Lookup!$C$2:$C$30,MATCH($A2,Lookup!$A$2:$A$30,0)))
Yury
Aug 02 2017 12:51 AM
Aug 02 2017 12:17 AM
SolutionHi John,
if your lookup data is in sheet named 'Lookup', and you have names in the range A2:A30, Lefty values in the range B2:B30, and Righty values in the range C2:C30, then your formula in the cell K2 of the 'New Hitters' sheet would be
=IF($G2="Left",INDEX(Lookup!$B$2:$B$30,MATCH($A2,Lookup!$A$2:$A$30,0)), INDEX(Lookup!$C$2:$C$30,MATCH($A2,Lookup!$A$2:$A$30,0)))
Yury