ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using wild characters for an array (https://www.excelbanter.com/excel-discussion-misc-queries/12277-using-wild-characters-array.html)

Steven

Using wild characters for an array
 
I have the following array:

{=MAX(IF($H$3:$H$271="Lookup",$C$3:$C$271))} where it returns the max
value. Is there a way to use * to say if lookup is in the string then that
is an item to test the max on also. I was trying
{=MAX(IF($H$3:$H$271="*Lookup*",$C$3:$C$271))} but that does not work. Is
there a solution?

Thank you for your help.

Steven


JE McGimpsey

One way (array-entered):

=MAX(IF(ISNUMBER(SEARCH("Lookup",$H$3:$H$271)),$C$ 3:$C$271))

If you want the search to be case-sensitive, use FIND() instead of
SEARCH().


In article ,
Steven wrote:

I have the following array:

{=MAX(IF($H$3:$H$271="Lookup",$C$3:$C$271))} where it returns the max
value. Is there a way to use * to say if lookup is in the string then that
is an item to test the max on also. I was trying
{=MAX(IF($H$3:$H$271="*Lookup*",$C$3:$C$271))} but that does not work. Is
there a solution?

Thank you for your help.

Steven


Steven

Right on the button. Thank you.

"JE McGimpsey" wrote:

One way (array-entered):

=MAX(IF(ISNUMBER(SEARCH("Lookup",$H$3:$H$271)),$C$ 3:$C$271))

If you want the search to be case-sensitive, use FIND() instead of
SEARCH().


In article ,
Steven wrote:

I have the following array:

{=MAX(IF($H$3:$H$271="Lookup",$C$3:$C$271))} where it returns the max
value. Is there a way to use * to say if lookup is in the string then that
is an item to test the max on also. I was trying
{=MAX(IF($H$3:$H$271="*Lookup*",$C$3:$C$271))} but that does not work. Is
there a solution?

Thank you for your help.

Steven




All times are GMT +1. The time now is 05:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com