Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
If I have two named ranges, Range_1 and Range_2...
and Cell A1 has a string that may or may not be in Range_1 and Cell B1 has a string that may or may not be in Range_2 is there a formula that will return a YES if both strings are present in the respective named ranges or a NO if either string is not present in its respective range? Say Range_1 is A2:A150, Range_2 is C2:J200. Thanks, Howard |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
On Wednesday, August 28, 2013 7:12:53 PM UTC-7, wrote:
If I have two named ranges, Range_1 and Range_2... and Cell A1 has a string that may or may not be in Range_1 and Cell B1 has a string that may or may not be in Range_2 is there a formula that will return a YES if both strings are present in the respective named ranges or a NO if either string is not present in its respective range? Say Range_1 is A2:A150, Range_2 is C2:J200. Thanks, Howard This seems to work, and I will adjust the ranges and cells. Sorry, I should have pondered a bit more before posting. =IF(SUMPRODUCT(--($A$8:$A$40=B5)*($B$8:$M$40=B4))<0,"YES","NO") Regards, Howard |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
Hi Howard,
Am Wed, 28 Aug 2013 19:23:55 -0700 (PDT) schrieb : =IF(SUMPRODUCT(--($A$8:$A$40=B5)*($B$8:$M$40=B4))<0,"YES","NO") that only works, if both search strings are in the same row in your ranges. Try: =IF(COUNT(FIND(B4,B8:M40))*COUNT(FIND(B5,A8:A40)) 0,"Yes","No") And enter the array formula with CTRL+Shift+Enter Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
On Wednesday, August 28, 2013 11:14:04 PM UTC-7, Claus Busch wrote:
Hi Howard, Am Wed, 28 Aug 2013 19:23:55 -0700 (PDT) schrieb : =IF(SUMPRODUCT(--($A$8:$A$40=B5)*($B$8:$M$40=B4))<0,"YES","NO") that only works, if both search strings are in the same row in your ranges. Try: =IF(COUNT(FIND(B4,B8:M40))*COUNT(FIND(B5,A8:A40)) 0,"Yes","No") And enter the array formula with CTRL+Shift+Enter Regards Claus B. Excellent point! Thanks Claus. Regards, Howard |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
|
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
Also: =IF((COUNTIF(Range_1,"*"&A1&"*")+COUNTIF(Range_2," *"& B1&"*"))=2,"Yes","No") Thanks, Ron. I am puzzled with the "*"&A1&"*" Googled and looked in my J. Walkenbach references but can't find a "...here's what this does." Regards, Howard |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
Hi Ron,
Am Thu, 29 Aug 2013 06:58:30 -0400 schrieb Ron Rosenfeld: =IF((COUNTIF(Range_1,"*"&A1&"*")+COUNTIF(Range_2," *"& B1&"*"))=2,"Yes","No") if the occurrence of search string1 in Range_1 is 2 times and of search string2 in Range_2 is none, then you will get also "Yes" I would change it to: =IF((COUNTIF(Range_1,A1)*COUNTIF(Range_2,B1))0,"Y es","No") Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
On Thu, 29 Aug 2013 18:23:33 +0200, Claus Busch wrote:
Hi Ron, Am Thu, 29 Aug 2013 06:58:30 -0400 schrieb Ron Rosenfeld: =IF((COUNTIF(Range_1,"*"&A1&"*")+COUNTIF(Range_2," *"& B1&"*"))=2,"Yes","No") if the occurrence of search string1 in Range_1 is 2 times and of search string2 in Range_2 is none, then you will get also "Yes" I would change it to: =IF((COUNTIF(Range_1,A1)*COUNTIF(Range_2,B1))0," Yes","No") Ah, yes. Good point. |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
|
#10
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
A find formul looking at two named ranges for two strings
On Thursday, August 29, 2013 5:32:51 PM UTC-7, Ron Rosenfeld wrote:
On Thu, 29 Aug 2013 05:44:41 -0700 (PDT), wrote: Also: =IF((COUNTIF(Range_1,"*"&A1&"*")+COUNTIF(Range_2," *"& B1&"*"))=2,"Yes","No") Thanks, Ron. I am puzzled with the "*"&A1&"*" Googled and looked in my J. Walkenbach references but can't find a "...here's what this does." Regards, Howard 1. See Claus note and change as he suggested: =IF((COUNTIF(Range_1,"*"&A1&"*")*COUNTIF(Range_2," *"& B1&"*"))0,"Yes","No") 2. In the COUNTIF criteria, wild cards are allowed. You will find that documented under HELP for the COUNTIF function. Okay, thanks. Howard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Given Address, find named ranges that contain it | Excel Programming | |||
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... | Excel Programming | |||
How do I find all named ranges in VB.NET? | Excel Discussion (Misc queries) | |||
How do I find all named ranges in VB.NET? | Excel Programming |