+ Reply to Thread
Results 1 to 2 of 2

Creating a deeply nested IF MATCH user defined function

  1. #1
    Registered User
    Join Date
    07-30-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    44

    Creating a deeply nested IF MATCH user defined function

    I am attempting to accomplish a task in Excel that I believe would be best as a UDF as I am having trouble getting it to work as a formula and finding the errors is proving too complex.

    Here is the formula, though it fails to produce "Other" in its current state.

    =IF($A10="Group",IF(ISNA(OR(MATCH(MatchValue,ListTables!H:H,FALSE),MATCH(MatchValue,ListTables!B:B,FALSE),$J10,IF(ISNA(MATCH(MatchValue,ListTables!H:H,FALSE)),"Approved","Other")))),$J10)

    I would like a UDF that can be written in Excel as =FunctionName(Group, MatchValue)

    I understand recreating this as VBA code would be too much to ask in its current state, so some starting group for me to complete this myself would be great. I am unsure of the code necessary to set up the IF and MATCH equivalents in VBA.

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Creating a deeply nested IF MATCH user defined function

    I think the error comes from

    ISNA(OR(...,...))

    Try using
    OR(ISNA(...),ISNA(...)) instead.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1