Solved

Search Criteria

Posted on 2014-03-30
2
164 Views
Last Modified: 2014-03-30
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
Comment
Question by:stakor
  • 2
2 Comments
 

Author Comment

by:stakor
ID: 39965695
I see this might be a possible solution, but am uncertain how to join the two.

=OR(first condition, second condition, …, etc.)
0
 

Accepted Solution

by:
stakor earned 0 total points
ID: 39965845
=IF(SUM(COUNTIF(A2,"*" &{"blah1";"blah2";"blah3"}& "*"))>0,"laptop","desktop")
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question