Solved

Need to deliver a count of certain names by looking for a string within a string and then counting the names associated with the smaller string

Posted on 2013-01-16
2
255 Views
Last Modified: 2013-01-16
I have a file I have been working on. The formula in B3:E3 was successful in looking up 1 of the 4 objects in A3 and then returning a value associated with the object in a different tab.

Here, I have a new type of problem where I need a formula in B3 on my Formulas tab to look at column A on my Areas tab and count all of the cells that have "LA" or "Las Vegas" for the object names in A3 on the Formulas tab.  The answer should be 2.

Thank you!
Test-File.xlsx
0
Comment
Question by:Dominator1025
2 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 38784235
Hello Dom,

This formula should give you the count for "LA" or "Las Vegas" [edited]

=SUMPRODUCT(ISNUMBER(SEARCH(","&Areas!$A$2:$A$2000&",",","&$A2&","))*(Areas!$B$2:$B$2000={"LA","Las Vegas"}))

That gets the results you suggested but only matches the whole 5 character object

You can change the {"LA","Las Vegas"} part to include any number of locations, if it's a single location you don't need the brackets { and }

regards, barry
0
 

Author Closing Comment

by:Dominator1025
ID: 38784552
Awesome, thanks again!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

838 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