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
242 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

863 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

18 Experts available now in Live!

Get 1:1 Help Now