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)))))))) |
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 ... |
All times are GMT +1. The time now is 07:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com