Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Nested If Function to be converted into a user-defined customfunction
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,F ind(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)))))))) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Nested If Function to be converted into a user-defined custom function
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" wrote in message ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - User Defined Function Error: This function takes no argume | Excel Programming | |||
Problem with a converted office 2003 file with user defined functi | Excel Programming | |||
Need to open the Function Arguments window from VBA for a user defined function. | Excel Programming | |||
changing nested if statements into a user defined function | Excel Programming | |||
User-Defined Function pre-empting Built-in Function? How to undo???? | Excel Programming |