if creteria is not found

G

Guest

I need help with two questions

I have the following

Column A
1 PASSAIC CNTY N J Callable 06/08@101
2 FLORIDA ST BRD ED CAP OUTLAY SER A
3 ERIE CNTY N Y PUB IMPT-SER C Taxable

I would like an advise how can I separate
1 Callable 06/08@101
3 Taxable
from the rest of the name assuming they are included in the name.

Column B
Column C
like 1 PASSAIC CNTY N J Callable 06/08@101
3 ERIE CNTY N Y PUB IMPT-SER C Taxable

I noticed that the distinctive mark where these names can be split is One
upper case letter following low capital letters.

I was able to find something like the following
=RIGHT(A4,LEN(A4)-FIND("*",SUBSTITUTE(A4," ","*",LEN(A4)-LEN(SUBSTITUTE(A4,"
",""))))) , but I am not sure yet whether it will work all the time

Also in cell C, if the cell doesn't contain word Callable ten move the word
like Taxable to the Colum D.

I appreciate you help enormously

Thank you
 
J

joeu2004

I have the following

Column A
1 PASSAIC CNTY N J Callable 06/08@101
2 FLORIDA ST BRD ED CAP OUTLAY SER A
3 ERIE CNTY N Y PUB IMPT-SER C Taxable

I would like [....]

Column B
Column C
like 1 PASSAIC CNTY N J Callable 06/08@101
3 ERIE CNTY N Y PUB IMPT-SER C Taxable
[....]
Also in cell C, if the cell doesn't contain word Callable ten move the word
like Taxable to the Colum D.

I think the following meets your immediate needs as stated above.

In column B (starting B1 and copy down):

=if(isnumber(find("Callable",A1)),
trim(left(A1,find("Callable",A1)-1)),
if(isnumber(find("Taxable",A1)),
trim(left(A1,find("Taxable",A1)-1)), A1))

In column C (starting in C1 and copy down):

=if(isnumber(find("Callable",A1)), right(A1,1+len(A1)-
find("Callable",A1)),
if(isnumber(find("Taxable",A1)), right(A1,1+len(A1)-
find("Taxable",A1)), ""))

Note: The following simplification might be sufficient:

=if(isnumber(find("Callable",A1)), right(...),
if(isnumber(find("Taxable",A1)), "Taxable", ""))

In column D (starting in C1 and copy down):

=if(isnumber(find("Callable",A1)), "", "Taxable")

I must say: your requirement for column D does not make sense to me.
First, not sure what you mean by "__the__ word like Taxable". Also,
"callable" and "taxable" are not mutually exclusive, nor does one
imply not the other.

I wonder if your needs would be met with the following simplification
in column C, obviating your requirement for column D:

=if(isnumber(find("Callable",A1)), right(...), "Taxable")

PS: You might minimize the redundant FIND() calls by using a (hidden)
helper cell that contains, for example, -n for callable, n for
taxable, and 0 otherwise.

HTH.


----- complete original posting -----
 
G

Guest

That's perfect,

One question though

What if there are more than just these two, honestly I am not sure how many
in total, I have stated these two as an example: "Callable 06/08@101" and
"Taxablel" and ..... and..... ?

How would I be able to extract everything to the rigth starting with first
captal letter and following with lower case?

Column A Column B
COMPANY Aaaaaaaa ATM only Aaaaaaaaa ATM

All the common factors thay have is in common is that the names which you
have so perfectly separated for me are in Capital Letters

WEST VIRGINIA ST HSG DEV FD Extraordinary Calls - Housing Use - Subject to AMT
ERIE CNTY N Y PUB IMPT-SER C Taxable
FLORIDA ST BRD ED CAP OUTLAY PUB ED-SER A Callable 06/08@101
WEST VIRGINIA ST HSG DEV FD Extraordinary Calls - Housing Use - Subject to AMT
UNIVERSITY P R UNIV REVS SER O PreRefund 06/10@100

Just to name a few.

Thanks a million.






joeu2004 said:
I have the following

Column A
1 PASSAIC CNTY N J Callable 06/08@101
2 FLORIDA ST BRD ED CAP OUTLAY SER A
3 ERIE CNTY N Y PUB IMPT-SER C Taxable

I would like [....]

Column B
Column C
like 1 PASSAIC CNTY N J Callable 06/08@101
3 ERIE CNTY N Y PUB IMPT-SER C Taxable
[....]
Also in cell C, if the cell doesn't contain word Callable ten move the word
like Taxable to the Colum D.

I think the following meets your immediate needs as stated above.

In column B (starting B1 and copy down):

=if(isnumber(find("Callable",A1)),
trim(left(A1,find("Callable",A1)-1)),
if(isnumber(find("Taxable",A1)),
trim(left(A1,find("Taxable",A1)-1)), A1))

In column C (starting in C1 and copy down):

=if(isnumber(find("Callable",A1)), right(A1,1+len(A1)-
find("Callable",A1)),
if(isnumber(find("Taxable",A1)), right(A1,1+len(A1)-
find("Taxable",A1)), ""))

Note: The following simplification might be sufficient:

=if(isnumber(find("Callable",A1)), right(...),
if(isnumber(find("Taxable",A1)), "Taxable", ""))

In column D (starting in C1 and copy down):

=if(isnumber(find("Callable",A1)), "", "Taxable")

I must say: your requirement for column D does not make sense to me.
First, not sure what you mean by "__the__ word like Taxable". Also,
"callable" and "taxable" are not mutually exclusive, nor does one
imply not the other.

I wonder if your needs would be met with the following simplification
in column C, obviating your requirement for column D:

=if(isnumber(find("Callable",A1)), right(...), "Taxable")

PS: You might minimize the redundant FIND() calls by using a (hidden)
helper cell that contains, for example, -n for callable, n for
taxable, and 0 otherwise.

HTH.


----- complete original posting -----

I need help with two questions

I have the following

Column A
1 PASSAIC CNTY N J Callable 06/08@101
2 FLORIDA ST BRD ED CAP OUTLAY SER A
3 ERIE CNTY N Y PUB IMPT-SER C Taxable

I would like an advise how can I separate
1 Callable 06/08@101
3 Taxable
from the rest of the name assuming they are included in the name.

Column B
Column C
like 1 PASSAIC CNTY N J Callable 06/08@101
3 ERIE CNTY N Y PUB IMPT-SER C Taxable

I noticed that the distinctive mark where these names can be split is One
upper case letter following low capital letters.

I was able to find something like the following
=RIGHT(A4,LEN(A4)-FIND("*",SUBSTITUTE(A4," ","*",LEN(A4)-LEN(SUBSTITUTE(A4,"
",""))))) , but I am not sure yet whether it will work all the time

Also in cell C, if the cell doesn't contain word Callable ten move the word
like Taxable to the Colum D.

I appreciate you help enormously

Thank you
 
J

joeu2004

What if there are more than just these two, honestly I am not sure how many
in total, I have stated these two as an example: "Callable 06/08@101" and
"Taxablel" and ..... and..... ?

I anticipated that might be the case.
How would I be able to extract everything to the rigth starting with first
captal letter and following with lower case?

I do not know an efficient way to use Excel functions to do this. I
would resort to VBA. Is that a reasonable option for you?

First, I'm not sure Excel has a rich enough set of string functions to
perform the kind of parsing that you have in mind. Second, for Excel
2003 and earlier, the error handling is baroque, requiring multiple
calls as you see in my examples. I believe this was "fixed" in Excel
2007 to some degree. But I'm speculating based on vague recollections
of postings by people who are more familiar with these functions.
 
R

RagDyer

You might try this kind of "long" formula:

=TRIM(LEFT(A1,MIN(FIND({"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"},
A1&"abcdefghijklmnopqrstuvwxyz"))-2))
 
J

joeu2004

You might try this kind of "long" formula:

=TRIM(LEFT(A1,MIN(FIND({"a","b","c","d","e","f","g","h","i","j","k","l","m"­,"n","o","p","q","r","s","t","u","v","w","x","y","z"},
A1&"abcdefghijklmnopqrstuvwxyz"))-2))

That is great! Just two corrections, I believe: (a) eliminate the
hyphen (of course); and (b) change "abcd..." to " abcd"; that is,
separate A1 from "abcd..." with a blank. I believe #b is needed to
avoid truncating the last character of an entry that has no lowercase
characters (e.g. "FLORIDA ST BRD ED CAP OUTLAY SER A" in the original
posting).

And for completeness, I believe the righthand part can be gotten with
the following:

=right(A1,len(A1)-min(...)+2)

Question: Can you explain why this works?

Normally, FIND(array,...) returns #VALUE unless it matches the first
element of the array ("a", in this case). But MIN(FIND(array,...))
somehow allows MIN() to evaluate the array of FIND's; that is,
MIN({FIND("a",...),FIND("b",...),...}). I would not have expected
that from the syntax above. I guess I do not know how Excel decides
to construct an array.
 
J

joeu2004

I got an error at-min(...) specifically (...)

Did you really type "min(....)" literally?! That is certainly not
what I meant. The "...." are ellipses: a series of dots used to
indicate that material has been deleted from a quotation. This is
what I meant:

=right(A1,len(A1)-
min(find({"a","b","c","d","e","f","g","h","i","j","k","l","m",
"n","o","p","q","r","s","t","u","v","w","x","y","z"},
A1&" abcdefghijklmnopqrstuvwxyz"))+2)

Don't forget to thank RagDyer for a great solution.
 
R

RagDyeR

I don't know what *hyphen* you're referring to when you say
"eliminate the hyphen ... "
I'm sure you're *not* referring to the "-2" at the end of the formula.
That is necessary to return the left side of the text, which was my
intention.

If you copy (as I did), the OP's example into a test sheet, and just
eliminate the prefixed row numbers, you'll see that my formula, as posted,
works perfectly.

As to inserting a space between the
&"
and the
a
I do agree that it does become necessary when there is no lower case text
present in the data,
*AND* there is *not a trailing space* in this data ! ! !
As is the case with the OP's example.
That's why my formula worked perfectly.
I didn't pick up on that extra added space in the OP's example in my
testing.

I included the Trim() to take care of any trailing spaces in the text
*returned by the formula*.

Now, as to using the array constant within Find():

You're absolutely correct in the fact that the #VALUE# error will be
returned,
*If no matching value is contained in the "Within Text" argument*!

Therefore ... that's exactly why I *ADDED* "abcdef ... etc." to the "Within
Text" argument!

So that Find() *Would* find all existing and *any* non-existing characters,
and not have to return an error message.
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------



You might try this kind of "long" formula:

=TRIM(LEFT(A1,MIN(FIND({"a","b","c","d","e","f","g","h","i","j","k","l","m"­,"n","o","p","q","r","s","t","u","v","w","x","y","z"},
A1&"abcdefghijklmnopqrstuvwxyz"))-2))

That is great! Just two corrections, I believe: (a) eliminate the
hyphen (of course); and (b) change "abcd..." to " abcd"; that is,
separate A1 from "abcd..." with a blank. I believe #b is needed to
avoid truncating the last character of an entry that has no lowercase
characters (e.g. "FLORIDA ST BRD ED CAP OUTLAY SER A" in the original
posting).

And for completeness, I believe the righthand part can be gotten with
the following:

=right(A1,len(A1)-min(...)+2)

Question: Can you explain why this works?

Normally, FIND(array,...) returns #VALUE unless it matches the first
element of the array ("a", in this case). But MIN(FIND(array,...))
somehow allows MIN() to evaluate the array of FIND's; that is,
MIN({FIND("a",...),FIND("b",...),...}). I would not have expected
that from the syntax above. I guess I do not know how Excel decides
to construct an array.
 
J

joeu2004

I don't know what *hyphen* you're referring to when you say
"eliminate the hyphen ... "

I should have been more specific: I am referring to the hyphen that
appears after "m".

But apparently, that depends on your news reader and/or window size.
I see the hyphen when I use Google Groups in IE. And the hyphen is
real: it is copied when I cut-and-paste, and that causes a syntax
error in Excel. However, there is no hyphen when I go to MS
Newsgroups using IE.
Now, as to using the array constant within Find():
You're absolutely correct in the fact that the #VALUE# error will be
returned,
*If no matching value is contained in the "Within Text" argument*!

Therefore ... that's exactly why I *ADDED* "abcdef ... etc." to the "Within
Text" argument!

So that Find() *Would* find all existing and *any* non-existing characters,
and not have to return an error message.

Chill out, dude! My inquiry was not a criticism or a challenge. I
was seeking greater understanding about how Excel works.

I understood why you concatenated the "a...z" text.

You might understand my point better if you try the following:

A1: BLAH BLAH Callable
B1 =find({"a",...,"z"}, A1)

where {"a",...,"z"} is my posting shorthand for the complete array and
string that you posted.

The above example returns 12, the position of "a". But when I change
the word Callable to History, FIND() returns #VALUE -- despite the
fact that there __is__ an "i" in the text, namely position 12.

The point is: FIND() alone does not sequence through the array
{"a",...,"z"} and return the position of the first matching
character. Instead, {"a",...,"z"} is reduced to the first element,
"a". You will see that if you use Evaluate Formula.

So FIND({"a",...,"z"},...) alone works only if "a" is in the second
argument (within_text).

However, when MIN() is put around FIND({...},...), as you did, Excel
treats that as MIN(FIND("a",...),FIND("b",...),...,FIND("z",...)).
Again, use Evaluate Formula to see this effectively. That is the
genious of your formulation: it treats the formula as an array
formula without having to commit with ctrl+shift+Enter.

In contrast, the following formulation works only if entered as an
explicit array formula (commit with ctrl+shift+Enter):

=min(find(char(code("a")+row($1:$26)-1),A1&" a...z"))

where " a...z" is my posting shorthand for the complete string that
you entered. By "works", I mean: it will result in the same position
of any lowercase character that your original formula finds. It does
not! Again, it only finds "a".

I was merely asking for someone to explain why Excel treats some
formulations implicitly as array formulas, whereas it requires us to
specify that explicitly in other cases.

I presume, now, that the key is the presence of the explicit array
constant {"{...}") versus the intended array operation expressed
implicitly by ROW($1:$26). Arguably, Excel cannot reasonably
determine our intended semantics without the hint offered by ctrl+shift
+Enter, even though we humans know that ROW($1:$26) makes little sense
as a non-array formulation.
 
R

RagDyeR

<<<"Chill out, dude! My inquiry was not a criticism or a challenge. I
was seeking greater understanding about how Excel works.">>>

I've just re-read my post, and ... to me ... I really don't see anything
that I believe would make you feel that I was taking your question as
anything but ... an honest question.

That is one of the problems of the written word, where the nuances, tone,
and body language of communication are left by the wayside, and strictly one
sided perceptions are brought to bear.

As to the question at hand, I don't see where Min() has anything to do with
the elimination of the error.

In your example, replacing "Callable" with "History", and wrapping Find()
with Min() doesn't correct anything.

In the formula bar, select Find() and the entire array constant, and hit
<F9>, and you'll see the #VALUE! error, interspersed with the locations of
the *found characters* contained in A1.

So Find() *is* calculating through the *entire* array constant.
This of course causes the error to be returned if it exists *anywhere*
within the array.
*ONLY* the addition of the missing characters to the "Within Text" argument
will eliminate the error.

Or am I still not comprehending your elucidation?

--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

I don't know what *hyphen* you're referring to when you say
"eliminate the hyphen ... "

I should have been more specific: I am referring to the hyphen that
appears after "m".

But apparently, that depends on your news reader and/or window size.
I see the hyphen when I use Google Groups in IE. And the hyphen is
real: it is copied when I cut-and-paste, and that causes a syntax
error in Excel. However, there is no hyphen when I go to MS
Newsgroups using IE.
Now, as to using the array constant within Find():
You're absolutely correct in the fact that the #VALUE# error will be
returned,
*If no matching value is contained in the "Within Text" argument*!

Therefore ... that's exactly why I *ADDED* "abcdef ... etc." to the
"Within
Text" argument!

So that Find() *Would* find all existing and *any* non-existing
characters,
and not have to return an error message.

Chill out, dude! My inquiry was not a criticism or a challenge. I
was seeking greater understanding about how Excel works.

I understood why you concatenated the "a...z" text.

You might understand my point better if you try the following:

A1: BLAH BLAH Callable
B1 =find({"a",...,"z"}, A1)

where {"a",...,"z"} is my posting shorthand for the complete array and
string that you posted.

The above example returns 12, the position of "a". But when I change
the word Callable to History, FIND() returns #VALUE -- despite the
fact that there __is__ an "i" in the text, namely position 12.

The point is: FIND() alone does not sequence through the array
{"a",...,"z"} and return the position of the first matching
character. Instead, {"a",...,"z"} is reduced to the first element,
"a". You will see that if you use Evaluate Formula.

So FIND({"a",...,"z"},...) alone works only if "a" is in the second
argument (within_text).

However, when MIN() is put around FIND({...},...), as you did, Excel
treats that as MIN(FIND("a",...),FIND("b",...),...,FIND("z",...)).
Again, use Evaluate Formula to see this effectively. That is the
genious of your formulation: it treats the formula as an array
formula without having to commit with ctrl+shift+Enter.

In contrast, the following formulation works only if entered as an
explicit array formula (commit with ctrl+shift+Enter):

=min(find(char(code("a")+row($1:$26)-1),A1&" a...z"))

where " a...z" is my posting shorthand for the complete string that
you entered. By "works", I mean: it will result in the same position
of any lowercase character that your original formula finds. It does
not! Again, it only finds "a".

I was merely asking for someone to explain why Excel treats some
formulations implicitly as array formulas, whereas it requires us to
specify that explicitly in other cases.

I presume, now, that the key is the presence of the explicit array
constant {"{...}") versus the intended array operation expressed
implicitly by ROW($1:$26). Arguably, Excel cannot reasonably
determine our intended semantics without the hint offered by ctrl+shift
+Enter, even though we humans know that ROW($1:$26) makes little sense
as a non-array formulation.
 
J

joeu2004

I've just re-read my post, and ... to me ... I really don't see anything
that I believe would make you feel that I was taking your question as
anything but ... an honest question.

I did not say that you didn't take it as "honest question". But your
response was loaded with *emphasized* [sic] words and exclamation
marks! [sic] -- even one triple exclamation!!! [sic] If that was not
intended to convey a particular tone, I guess we have to take your
word for it. No matter. It did not bother me. I just wanted you to
settle down.
As to the question at hand, I don't see where Min() has anything to do with
the elimination of the error.

I don't believe I said it did. That's the problem: You focus on my
off-hand mention of #VALUE in some cases of FIND(), whereas my
question was about getting the right solution -- specifically, about
sequencing through the __array__ of constants "a", "b", etc.

So let's do a reset, and let me try to clarify one last time.

(For the OP, I want to note that this digression has nothing to do
with your problem and its solution. RagDyer provided a great solution
in his first posting.)

Yes, your concatenation of " a...z" is the ingenious key to avoiding
#VALUE from FIND() in all cases. That obviates the need to use IF()
as I did, which is very messy, not to mention grossly inefficient due
to the multiple FINDs.

As I said, great solution! Are we square on that? That should be the
end of any discussion about avoiding #VALUE.

My follow-up point was: Concatenating " a...z" in FIND() alone does
not result in the correct answer. That is, even though
FIND({"a",...,"z"},A1&" a...z") returns a numerical result instead of
#VALUE when the first mixed-case word in A1 is History, for example,
it returns the wrong numerical result, namely the position of "a" in
the concatenated part.

Enclosing that with MIN() -- that is, MIN(FIND({"a",...,"z"},A1&"
a...z")) -- is required in order to find "i" in History instead of "a"
in " a...z". That is, it is the enclosing with MIN() that causes
FIND({"a",...,"z"},...) to be evaluated as
{FIND("a",...),...,FIND("z",...)} (stylistically).

I took it for granted that you knew that. After all, why else did
your write MIN(FIND(...))? (Rhetorical.) Forgive me if I was
presumptuous. Perhaps you are only parroting a solution that someone
else crafted, and you never stopped to understand all of the elements
that make it work.

In any case, my original question was not "how does that work?" (or
"why does that eliminate #VALUE?"), referring to your solution. I
knew that from the start -- all of the elements.

My original question (now rhetorical because I believe I have answered
it for myself) was: Why does Excel recognize that as an array formula
without the need to commit with ctrl+shift+Enter (CSE), whereas CSE is
needed for Excel to recognize other forms of array formulas, for
example MIN(FIND(CHAR(CODE("a")+ROW($1:$26)-1),A1&" a...z")?

To reiterate: My question was about the handling of the array, not
about the #VALUE. I mentioned the #VALUE only incidentally because
that is the most obvious proof that FIND() itself is not sequencing
through the array {"a",...,"z"}. If we concatenate " a...z", yes,
FIND() does not result in #VALUE; but the number returned may be the
position of "a" -- and no other letter -- in the concatenated part.
(Unless there is an "a" -- and no other letter -- to the left.)
So Find() *is* calculating through the *entire* array constant.

No it is not. Please use Evaluate Formula to see what happens when we
have simply:

=find({"a",...,"z"},A1&" a...z")

where A1 contains "BLAH BLAH History". You will see that
{"a",...,"z"} is reduced to "a". Consequently, you will see that
FIND() returns 19, the position of "a" in the concatenated part,
instead of 12, the position of "i" in History.
This of course causes the error to be returned if it exists *anywhere*
within the array.

Yes, MIN(FIND(...)) returns an error if any of FIND("a",...),
FIND("b",...) etc fail. I don't believe I said or implied
differently. At least, that was not my intention.
*ONLY* the addition of the missing characters to the "Within Text" argument
will eliminate the error.

Yes. I did not intend to say otherwise. I wrote: ``So
FIND({"a",...,"z"},...) alone works only if "a" is in the second
argument (within_text). However, when MIN() is put around
FIND({...},...), as you did, Excel treats that as
MIN(FIND("a",...),FIND("b",...),...,FIND("z",...)).``

The operative words were "as you did" -- everything that you did. I
think the confusion arises, in part, because of my careless use of the
"..." shorthand without sufficient explanation. Mea culpa!
Or am I still not comprehending your elucidation?

Yes. But I hope this final posting (for me) helps your comprehension
of my points, which are different from your point about #VALUE.

If you still do not understand, no matter. We both know your solution
works, and I (at least) fully understand why -- I always did.
 
R

Ragdyer

Several years ago, when I learned from Harlan about deciphering how a
formula, or parts of a formula equate by using the <F9> function key on
selected parts of formulas in the formula bar, has made understanding *what*
is happening, as opposed to *why* it's happening, very obvious.

If you would do that by selecting the Find() portion of the formula against
your examples of:
BLAH BLAH Callable
and
BLAH BLAH History

You will see why it's very self-evident and basically intuitive as to why I
used Min().

In fact, it's so elemantal, that's why I didn't think to address it in that
aspect of your post, thinking you comprehended it's use in that vein, and
were discussing it in another usage form.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
joeu2004 said:
I've just re-read my post, and ... to me ... I really don't see anything
that I believe would make you feel that I was taking your question as
anything but ... an honest question.

I did not say that you didn't take it as "honest question". But your
response was loaded with *emphasized* [sic] words and exclamation
marks! [sic] -- even one triple exclamation!!! [sic] If that was not
intended to convey a particular tone, I guess we have to take your
word for it. No matter. It did not bother me. I just wanted you to
settle down.
As to the question at hand, I don't see where Min() has anything to do with
the elimination of the error.

I don't believe I said it did. That's the problem: You focus on my
off-hand mention of #VALUE in some cases of FIND(), whereas my
question was about getting the right solution -- specifically, about
sequencing through the __array__ of constants "a", "b", etc.

So let's do a reset, and let me try to clarify one last time.

(For the OP, I want to note that this digression has nothing to do
with your problem and its solution. RagDyer provided a great solution
in his first posting.)

Yes, your concatenation of " a...z" is the ingenious key to avoiding
#VALUE from FIND() in all cases. That obviates the need to use IF()
as I did, which is very messy, not to mention grossly inefficient due
to the multiple FINDs.

As I said, great solution! Are we square on that? That should be the
end of any discussion about avoiding #VALUE.

My follow-up point was: Concatenating " a...z" in FIND() alone does
not result in the correct answer. That is, even though
FIND({"a",...,"z"},A1&" a...z") returns a numerical result instead of
#VALUE when the first mixed-case word in A1 is History, for example,
it returns the wrong numerical result, namely the position of "a" in
the concatenated part.

Enclosing that with MIN() -- that is, MIN(FIND({"a",...,"z"},A1&"
a...z")) -- is required in order to find "i" in History instead of "a"
in " a...z". That is, it is the enclosing with MIN() that causes
FIND({"a",...,"z"},...) to be evaluated as
{FIND("a",...),...,FIND("z",...)} (stylistically).

I took it for granted that you knew that. After all, why else did
your write MIN(FIND(...))? (Rhetorical.) Forgive me if I was
presumptuous. Perhaps you are only parroting a solution that someone
else crafted, and you never stopped to understand all of the elements
that make it work.

In any case, my original question was not "how does that work?" (or
"why does that eliminate #VALUE?"), referring to your solution. I
knew that from the start -- all of the elements.

My original question (now rhetorical because I believe I have answered
it for myself) was: Why does Excel recognize that as an array formula
without the need to commit with ctrl+shift+Enter (CSE), whereas CSE is
needed for Excel to recognize other forms of array formulas, for
example MIN(FIND(CHAR(CODE("a")+ROW($1:$26)-1),A1&" a...z")?

To reiterate: My question was about the handling of the array, not
about the #VALUE. I mentioned the #VALUE only incidentally because
that is the most obvious proof that FIND() itself is not sequencing
through the array {"a",...,"z"}. If we concatenate " a...z", yes,
FIND() does not result in #VALUE; but the number returned may be the
position of "a" -- and no other letter -- in the concatenated part.
(Unless there is an "a" -- and no other letter -- to the left.)
So Find() *is* calculating through the *entire* array constant.

No it is not. Please use Evaluate Formula to see what happens when we
have simply:

=find({"a",...,"z"},A1&" a...z")

where A1 contains "BLAH BLAH History". You will see that
{"a",...,"z"} is reduced to "a". Consequently, you will see that
FIND() returns 19, the position of "a" in the concatenated part,
instead of 12, the position of "i" in History.
This of course causes the error to be returned if it exists *anywhere*
within the array.

Yes, MIN(FIND(...)) returns an error if any of FIND("a",...),
FIND("b",...) etc fail. I don't believe I said or implied
differently. At least, that was not my intention.
*ONLY* the addition of the missing characters to the "Within Text" argument
will eliminate the error.

Yes. I did not intend to say otherwise. I wrote: ``So
FIND({"a",...,"z"},...) alone works only if "a" is in the second
argument (within_text). However, when MIN() is put around
FIND({...},...), as you did, Excel treats that as
MIN(FIND("a",...),FIND("b",...),...,FIND("z",...)).``

The operative words were "as you did" -- everything that you did. I
think the confusion arises, in part, because of my careless use of the
"..." shorthand without sufficient explanation. Mea culpa!
Or am I still not comprehending your elucidation?

Yes. But I hope this final posting (for me) helps your comprehension
of my points, which are different from your point about #VALUE.

If you still do not understand, no matter. We both know your solution
works, and I (at least) fully understand why -- I always did.
 
J

joeu2004

You will see why it's very self-evident and basically intuitive as to why I
used Min().

In fact, it's so elemantal, that's why I didn't think to address it in that

Yes, it is elemental. I did not ask why you used MIN() or how or why
it works. I already knew both. One last time, I was asking why Excel
treated the formula as an array formula without having to commit it
using ctrl+shift+Enter.

Obviously we are not communicating well. But your inability to
understand me is of no consequence to me. I believe I have answered
my own question.
 
R

Ragdyer

Again, since most of my knowledge is about what, and not why, I would
venture to say ... an array constant does not an array formula make ... nor
need an array formula to operate.

=Sum(Countif(a1:a100,{"a","b","c"}))

=If(or(a1={1,2,3}),"good","bad")

=Lookup(c1,{"dick","harry","john";100,200,300})
 
G

Guest

Thank you all for your hard work,

Sorry for all the confusion I have caused,
I didn't intend to do that.

You did provide me with the answers I was seeking.
 
R

RagDyeR

You're welcome, and thank you for the feed-back ... BUT ... You have
absolutely *nothing* to be sorry for!

Discussions between responders is very common in these groups.

It aids in the learning and teaching process.

That's why these XL groups are the *best* ones around.<bg>
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

Thank you all for your hard work,

Sorry for all the confusion I have caused,
I didn't intend to do that.

You did provide me with the answers I was seeking.
 

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