ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   FIND function for an array (https://www.excelbanter.com/excel-discussion-misc-queries/127743-find-function-array.html)

FARAZ QURESHI

FIND function for an array
 
Following is the column data:
A
1 America
2 Britain
3 UAE
4 Saudia

Do I have a choice to use an array formula using the FIND function to be
placed in B1 so as to evaluate if there exists an "m" in any cell of the
array A1:A4?

Similarly, do I have a choice to use an array formula using the FIND
function to be placed in B1 so as to evaluate if there exists an "a" in all
the cells of the array A1:A4?

Ron Coderre

FIND function for an array
 
If you only want to know if those conditions exist
try something like this:

Test if any cell in A1:A4 contains an "m"
B1: =COUNTIF(A1:B4,"*m*")0

Test if ALL cells in A1:A4 contain an "a"
B1: =COUNTIF(A1:B4,"*a*")=ROWS(A1:B4)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"FARAZ QURESHI" wrote:

Following is the column data:
A
1 America
2 Britain
3 UAE
4 Saudia

Do I have a choice to use an array formula using the FIND function to be
placed in B1 so as to evaluate if there exists an "m" in any cell of the
array A1:A4?

Similarly, do I have a choice to use an array formula using the FIND
function to be placed in B1 so as to evaluate if there exists an "a" in all
the cells of the array A1:A4?


Ron Coderre

FIND function for an array
 
Typos!...(sorry)

The references to A1:B4
should be A1:A4

These are correct:

Test if any cell in A1:A4 contains an "m"
B1: =COUNTIF(A1:A4,"*m*")0

Test if ALL cells in A1:A4 contain an "a"
B1: =COUNTIF(A1:A4,"*a*")=ROWS(A1:A4)


***********
Regards,
Ron

XL2002, WinXP


"Ron Coderre" wrote:

If you only want to know if those conditions exist
try something like this:

Test if any cell in A1:A4 contains an "m"
B1: =COUNTIF(A1:B4,"*m*")0

Test if ALL cells in A1:A4 contain an "a"
B1: =COUNTIF(A1:B4,"*a*")=ROWS(A1:B4)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"FARAZ QURESHI" wrote:

Following is the column data:
A
1 America
2 Britain
3 UAE
4 Saudia

Do I have a choice to use an array formula using the FIND function to be
placed in B1 so as to evaluate if there exists an "m" in any cell of the
array A1:A4?

Similarly, do I have a choice to use an array formula using the FIND
function to be placed in B1 so as to evaluate if there exists an "a" in all
the cells of the array A1:A4?


FARAZ QURESHI

FIND function for an array
 
Great RON,

Thanx,

Never had an idea how to use an asterik in "" in Countif function.

Thanx again

"Ron Coderre" wrote:

Typos!...(sorry)

The references to A1:B4
should be A1:A4

These are correct:

Test if any cell in A1:A4 contains an "m"
B1: =COUNTIF(A1:A4,"*m*")0

Test if ALL cells in A1:A4 contain an "a"
B1: =COUNTIF(A1:A4,"*a*")=ROWS(A1:A4)


***********
Regards,
Ron

XL2002, WinXP


"Ron Coderre" wrote:

If you only want to know if those conditions exist
try something like this:

Test if any cell in A1:A4 contains an "m"
B1: =COUNTIF(A1:B4,"*m*")0

Test if ALL cells in A1:A4 contain an "a"
B1: =COUNTIF(A1:B4,"*a*")=ROWS(A1:B4)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"FARAZ QURESHI" wrote:

Following is the column data:
A
1 America
2 Britain
3 UAE
4 Saudia

Do I have a choice to use an array formula using the FIND function to be
placed in B1 so as to evaluate if there exists an "m" in any cell of the
array A1:A4?

Similarly, do I have a choice to use an array formula using the FIND
function to be placed in B1 so as to evaluate if there exists an "a" in all
the cells of the array A1:A4?



All times are GMT +1. The time now is 04:35 AM.

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