OK, I’m using the VLOOKUP function, and I have one little problem. When it can’t find the name its looking up, is there a way for it to return the value 0 instead of #N/A?
What I’m doing is using the function to lookup baseball statistics. I have one sheet in my workbook with statistics for every player in the league in 2000. On another sheet I have it set up so I type in a player’s name in one cell, and it will return statistics in the next few cells in the row. If I type in a player’s name who didn’t play in the majors in 2000, and therefore isn’t on the statistics list, it returns the #N/A for all of his stats. Instead of returning #N/A, I just want it to return a zero value.
For example, if I type in “Martinez, Pedroj” on the second sheet, everything works fine and it returns his 2000 pitching stats. However, if I type in “Sheets, Ben” it returns a bunch of #N/A’s and that in turn screws up my totals. Any way to overcome this problem?