Question

This is what I have been using and it works perfectly fine when only 1 cell is defined.

=IFERROR(SEARCH($K$2,C2),"")

The above returns a result when using vlookup but I want the Within_Text to be searching across C2:E2.

When I change it to

=IFERROR(SEARCH($K$2,C2:E2),"") and I search for something that is in C2:E2 I don't get any results. 

The vlookup I am using is this:

=IFERROR(VLOOKUP(J3,A2:E200,{3,4,5}, FALSE),"")

The purpose of this is to be searching 3 columns that are comprised of full name, specialty and department and I want to be able to search any of the columns and for it to return the 3 fields for each person. (if that makes sense).

Was it helpful?

Solution

For Excel functions where the function requires only one cell but your data is in a range (or non-contiguous cells), the trick can sometimes be to organise that data that into a single cell.

This can be done with the concatenate function as:

=concatenate(b2, c2, e2)

If you want the concatenated data to be human readable try something like:

=concatenate(b2, " ", c2, " ", e2)

This way, Excel can use the data you need the way it wants.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top