I'm struggling with a formula that will return all the charachters to the left of a "-", but I am having issues with #value when a "-" is not present in the lookup cell...

When the vlookup cell is blank I need the returned value to be blank (first part of the formula). The second criteria is to find "-". If "-" exists, return all text to the left. If "-" does not exist, then return all text.

Formula: copy to clipboard
=IF(VLOOKUP($A1,Data!$A$1:$B$650,2,FALSE)="","",IF(SEARCH("-",VLOOKUP($A1,Data!$A$1:$B$650,2,FALSE),1),LEFT(VLOOKUP($A1,Data!$A$1:$B$650,2,FALSE), FIND("-",VLOOKUP($A1,Data!$A$1:$B$650,2,FALSE),1)-1),VLOOKUP($A1,Data!$A$1:$B$650,2,FALSE)))