Solved

Search Criteria

Posted on 2014-03-30
2
158 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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,…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now