Nested If Function to be converted into a user-defined customfunction

A

andreashermle

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))))))))
 
H

helene and gabor

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

news:1db1560e-7f21-4f37-b885-9b77bc62871e@o39g2000vbd.googlegroups.com...
 

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