LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 4
Default Search for either one or the other

Hi,

I'm trying to count the number of entries in a range B2:B1847 that are either
BKROCK
BLACKRCK
BLACKROCK
BLACROCK
BLK RCK
BLKRCK
BLKRK
BLKRO
BLKROCK
(note that these all have numerous strings of differing amounts of numbers on the end so I cannot use a RIGHT function)

The formula I had been using up until now was
=SUMPRODUCT((#other criteria#)*(LEFT(B2:B1847,2)="BL"))
but this returns BLACK RIVER which I don't want to count and doesn't include BKROCK OR BLKRO.

I also tried the following:
=SUMPRODUCT((#other criteria#)*(ISNUMBER(SEARCH("CK",B2:B1847))))
but this counts MAVERICK CAPITAL as well and not BLKRO.

I wondered if I could perhaps combine a SEARCH and OR function as follows
=SUMPRODUCT((#other criteria#)*(ISNUMBER(SEARCH(OR("BKROCK","BLACKRCK" ,"BLACKROCK","BLACROCK","BLK RCK","BLKRCK","BLKRK","BLKRO","BLKROCK"
),B2:B1847))))
but it just returns the value 0.


Does anyone know what I'm doing wrong and if there is another way around it?
Thanks!

Last edited by blivy : August 7th 12 at 10:18 AM Reason: Realised there were extra Black Rock variations
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search string to search for wild terms in Access database gab1972 Excel Programming 0 January 27th 10 05:37 PM
Set up search box to, by default, search workbook in the extraoptions? StargateFanNotAtHome[_2_] Excel Programming 2 September 3rd 09 03:42 PM
Search lastname + firstname (search on uppercase) Fr. Vandecan Excel Programming 2 April 8th 07 03:11 PM
How do I search excel spreadsheets using multiple search criteria. Kasper Excel Worksheet Functions 4 December 15th 05 12:26 AM
Create a search Field within a worksheet to search command buttons Ed P[_2_] Excel Programming 1 December 14th 04 08:04 PM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"