LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default 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))))))))
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - User Defined Function Error: This function takes no argume BruceInCalgary Excel Programming 3 August 23rd 06 08:53 PM
Problem with a converted office 2003 file with user defined functi ugoveri Excel Programming 0 July 2nd 06 08:16 PM
Need to open the Function Arguments window from VBA for a user defined function. [email protected] Excel Programming 0 June 20th 06 03:53 PM
changing nested if statements into a user defined function Rob Slagle Excel Programming 3 July 23rd 04 07:04 PM
User-Defined Function pre-empting Built-in Function? How to undo???? MarWun Excel Programming 1 August 6th 03 09:31 PM


All times are GMT +1. The time now is 12:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"