Results 1 to 10 of 10

#Value error in Excel Public Function

Threaded View

  1. #1
    Registered User
    Join Date
    07-16-2012
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    5

    #Value error in Excel Public Function

    Good Afternoon,

    I keep getting the #Value! result using the syntax below. I'm new to writing user defined functions so the solution is not easy for me. Please help.

    Public Function FORECAST(SvcDescr, Month1, Month2)
     
    If (SvcDescr = "Filter/Block") And (Month2 > 17 Or Month2 <= 29) Then Ret = (29 * 11) + Month1
    
    Else
    
    If (SvcDescr = "Filter/Block") And (Month2 = 17) Then Ret = (17 * 11) + Month1
    
    Else
    
    If (SvcDescr = "Filter/Block") And (Month2 < 17) Then Ret = (12 * 11) + Month1
    
    getFORECAST = Ret
    
    End Function
    Last edited by Leith Ross; 07-17-2012 at 03:16 AM. Reason: Added Code Tags

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