Helpful New Functions: ALL and ANY

G

Guest

I'd really like Excel to have an All(range, criteria) function, as used in a
number of programming languages. For instance:

A B C D
1 y y y n
2
3


=ALL(A1:C1, "y") --> TRUE
=ALL(A1:D1, "y") --> FALSE

In a similar vein, the ANY function would be quite handy:

=ANY(A1:C1, "y") --> TRUE
=ANY(A1:C1, "n") --> TRUE
=ANY(A1:C1, "o") --> FALSE

Anyone else think so?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions
 
G

Guest

Think ..
=ALL(A1:C1, "y") --> TRUE
=ALL(A1:D1, "y") --> FALSE

would be the same as using:
=COUNTIF(A1:C1,"y")=COLUMNS(A1:C1)
=COUNTIF(A1:D1,"y")=COLUMNS(A1:D1)

and ..
=ANY(A1:C1, "y") --> TRUE
=ANY(A1:C1, "n") --> TRUE
=ANY(A1:C1, "o") --> FALSE

would be the same as using:
=COUNTIF(A1:C1,"y")>0
=COUNTIF(A1:C1,"n")>0
=COUNTIF(A1:C1,"o")>0

---
 
B

Bob Phillips

See your previous post.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

Atreides said:
I'd really like Excel to have an All(range, criteria) function, as used in a
number of programming languages. For instance:

A B C D
1 y y y n
2
3


=ALL(A1:C1, "y") --> TRUE
=ALL(A1:D1, "y") --> FALSE

In a similar vein, the ANY function would be quite handy:

=ANY(A1:C1, "y") --> TRUE
=ANY(A1:C1, "n") --> TRUE
=ANY(A1:C1, "o") --> FALSE

Anyone else think so?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...dg=microsoft.public.excel.worksheet.functions
 
R

Ron Rosenfeld

I'd really like Excel to have an All(range, criteria) function, as used in a
number of programming languages. For instance:

A B C D
1 y y y n
2
3


=ALL(A1:C1, "y") --> TRUE
=ALL(A1:D1, "y") --> FALSE

In a similar vein, the ANY function would be quite handy:

=ANY(A1:C1, "y") --> TRUE
=ANY(A1:C1, "n") --> TRUE
=ANY(A1:C1, "o") --> FALSE

Anyone else think so?


You could always use the array entered formulas:

=AND(rng="y") for ALL

and

=OR(rng="y") for ANY


--ron
 
S

Stephen Bye

Atreides said:
I'd really like Excel to have an All(range, criteria) function, as used in
a
number of programming languages. For instance:


Just out of curiosity, can you tell me a programming language other than SQL
that has an ALL or ANY function?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top