From: andreashermle on
Dear Experts:

below formula (nested if formula) WORKS FINE in EXCEL 2007, but it is
not working in 2003 for known reasons (number of conditions exceeding
the limit) .

I now would like to create a user-defined custom function (UDF) in
Excel 2003.

I know how to operate the VBA Editor but I got no idea how this nested
If-Formula translates into a VBA-code.

Could somebody please help me. Help is much appreciated. Thank you
very much in advance.

Regards, Andreas

------------------------------------------------------------------------------

Below formula (nested IF-Function) that WORKS fine in Excel 2007
should be translated into a VBA code for a custom-defined function for
Excel 2003


IF(F21="","",IF(ISERROR(VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd30,2,FALSE))=FALSE,VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd30,2,FALSE),IF(ISERROR(VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd100,2,FALSE))=FALSE,VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd100,2,FALSE),IF(ISERROR(VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd200,2,FALSE))=FALSE,VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd200,2,FALSE),IF(ISERROR(VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd300,2,FALSE))=FALSE,VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd300,2,FALSE),IF(ISERROR(VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd500,2,FALSE))=FALSE,VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixInd500,2,FALSE),IF(ISERROR(VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixNK,
2,FALSE))=FALSE,VLOOKUP(LEFT(F21,Find(CHAR(10),F21)-1),'DocumentPath.xls'!
MatrixNK,2,FALSE))))))))
From: helene and gabor on
Hello Andreas,

It would be helpful for understanding your problem if you could assign say
cells: A1 to A10 to your partial results that come up nearly in each section
of your formulae.
An explanation of how you use this components ( a verbal summary of the
formulae) in your long IF statement would help anyone thinking about your
problem.

best regards,

Gabor Sebo

"andreashermle" <andreas.hermle(a)gmx.de> wrote in message
news:1db1560e-7f21-4f37-b885-9b77bc62871e(a)o39g2000vbd.googlegroups.com...

 | 
Pages: 1
Prev: #ref error
Next: Macros Menu in Excel 2007