Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count text cells based on two criteria

You can concatenate spaces:

--(ISNUMBER(SEARCH(" robert "," "&B1:B100&" ")))

But this still isn't bulletproof:

robert?
robert, jim
,robert,


--
Biff
Microsoft Excel MVP


"Pete_UK" wrote in message
...
But there might not be a space before or after robert in the data.

Pete

On May 2, 12:06 am, "Ashish Mathur" wrote:
Hi,

IN which case, one can use " robert " in the search function

--
Regards,

Ashish Mathur
Microsoft Excel MVPwww.ashishmathur.com

"T. Valko" wrote in message

...



Be advised that one of the pitfalls of this type of string matching is
the
possibility of "false positives".


--(ISNUMBER(SEARCH("robert",B1:B100)))


That will find:


robert
roberta
roberts
robertson


Basically *anything* that contains the substring "robert".


--
Biff
Microsoft Excel MVP


"Jamie" wrote in message
...
IT WORKED!!!!
THANK YOU!


"T. Valko" wrote:


SUMPRODUCT doesn't work with wild cards.


Try it like this:


=SUMPRODUCT(--(A1:A100="betty"),--(ISNUMBER(SEARCH("robert",B1:B100))))


--
Biff
Microsoft Excel MVP


"Jamie" wrote in message
...
guys,
this works well, but If there's a wild card in the formula it
doesn't
work.


For example:
=Sumproduct(--(A1:A100="betty"),--(B1:B100="*robert*"))


thanks,


"Tom Ogilvy" wrote:


=Sumproduct(--(A1:A100="betty"),--(B1:B100="robert"))


--
Regards,
Tom Ogilvy


"aet999" wrote:


I have a spreadsheet with many columns. I would like to count how
many
occurances there are of two criteria matching. Example, If column
A
contains
names of girls (amy, betty, susie, karen, betty) and column B
contains
names
of boys (michael, robert, andrew, james, joseph). how many times
does
column
A = betty AND column b = robert on the same row? In this example,
the
answer
would be one.- Hide quoted text -


- Show quoted text -



Reply
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
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM
counting cells (COUNTIF) based on two or more criteria Tricia S. Excel Worksheet Functions 10 March 17th 05 02:17 PM
count non blank cells which meet criteria in another column cmarsh5035 Excel Worksheet Functions 2 February 16th 05 04:32 PM
Counting rows based on criteria in multiple cells Margaret Excel Discussion (Misc queries) 11 December 2nd 04 11:04 PM
conditional formating - Highlighting text cells based on sales res ANDREW_B Excel Discussion (Misc queries) 7 December 2nd 04 04:27 PM


All times are GMT +1. The time now is 05:48 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"