Results 1 to 2 of 2

Excel 2007 : Calling functions based on input values in Excel 07 (functions array?)

Threaded View

duby13 Calling functions based on... 02-10-2012, 05:19 PM
JieJenn Re: Calling functions based... 02-10-2012, 05:27 PM
  1. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Calling functions based on input values in Excel 07 (functions array?)

    Try UDF. I created a custom function called XYZ with 2 inputs required. X is the value, y is the item #

    Function XYZ(X As Double, Y As Integer) As Double
    Select Case Y
        Case 1: XYZ = X - 6
        Case 2: XYZ = X + 91
        Case 3: XYZ = X / 2
        Case 4: XYZ = X * 21
        Case 5: XYZ = Sqr(X)
    End Select
        
    End Function

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