Forum Discussion
Formula Assistance
- Feb 23, 2018
Brittany,
as Willy Lau already mentioned your model has two flaws: Searching an entire column and blank entries for you search criteria.
If you want to use range reference that changes from time to time you can convert it into an Excel Table and use structured references.
If your search criteria are manual input then just avoid blank cells.
And here is another formula to cope with blank cells:
{=LOOKUP(9^99,SEARCH(IF($D$1:$D$5="",NA(),$D$1:$D$5),A1),$D$1:$D$5)}
Brittany,
as Willy Lau already mentioned your model has two flaws: Searching an entire column and blank entries for you search criteria.
If you want to use range reference that changes from time to time you can convert it into an Excel Table and use structured references.
If your search criteria are manual input then just avoid blank cells.
And here is another formula to cope with blank cells:
{=LOOKUP(9^99,SEARCH(IF($D$1:$D$5="",NA(),$D$1:$D$5),A1),$D$1:$D$5)}
Thanks, Detlef_Lewin. I don't know much about LOOKUP function. In this case, it is much better than index&match.
- Detlef_LewinFeb 23, 2018Silver Contributor
Willy Lau, as always there is more than one way to solve a problem in Excel.