Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

Search Criteria

I have a spreadsheet that in column A, will have a number of things listed in it. I want to have column D show up as either a laptop or a desktop, based on the values in column A. The equation for column D at the moment, reads:

=IFERROR(IF(SEARCH("blah",A2),"Laptop",""),"Desktop")

The logic says that if it isn't a match, say it is a Desktop. This is fine, but I need to be able to search for any of a number of terms, and if there is no match, then say it is a desktop. So for instance, how does one change the above query to match for any of the following (but not all):

blah
blah2
blah3

is there a way to do a search for any one of the following?
0
stakor
Asked:
stakor
  • 2
1 Solution
 
stakorAuthor Commented:
I see this might be a possible solution, but am uncertain how to join the two.

=OR(first condition, second condition, …, etc.)
0
 
stakorAuthor Commented:
=IF(SUM(COUNTIF(A2,"*" &{"blah1";"blah2";"blah3"}& "*"))>0,"laptop","desktop")
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now