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