On 2002-10-14 20:48, The Idea Dude wrote:
Aladin, is it possible to set this formula up to allow for all 3 combinations so I don't get a #NA error
You mean you want to apply
=MAX(MATCH(9.99999999999999E+307,A:A),MATCH(REPT("z",50),A:A))
to a column instead of first determining the data type and choosing the appropriate formula. The following formula would do what you want...
=MAX(IF(ISNUMBER(SETV(MATCH(9.99999999999999E+307,A:A),1)),GETV(1),0),IF(ISNUMBER(SETV(MATCH(REPT("z",90),A:A),2)),GETV(2),0))
but it requires that you install the morefunc.xll add-in, downloadable from:
http://longre.free.fr/english/index.html
A tip. You can assign a name, say BigNum, to the big number that figures in the above formula and use that name in the formula instead.
(1.) Activate Insert|Name|Define.
(2.) Enter BigNum as name in the Names in Workbook box.
(3.) Enter in the Refers to box:
9.99999999999999E+307
(4.) Click OK.
The above formula now beomes...
=MAX(IF(ISNUMBER(SETV(MATCH(BigNum,A:A),1)),GETV(1),0),IF(ISNUMBER(SETV(MATCH(REPT("z",90),A:A),2)),GETV(2),0))
Aladin