Results 1 to 5 of 5

My Function is not Auto Calculating

Threaded View

Wongadob My Function is not Auto... 07-12-2011, 06:30 AM
romperstomper Re: My Function is not Auto... 07-12-2011, 07:12 AM
Wongadob Re: My Function is not Auto... 07-12-2011, 07:15 AM
romperstomper Re: My Function is not Auto... 07-12-2011, 07:22 AM
Wongadob Re: My Function is not Auto... 07-13-2011, 01:40 PM
  1. #1
    Registered User
    Join Date
    06-13-2011
    Location
    Neston, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    38

    My Function is not Auto Calculating

    I have created a function (shown below) and I call it from my excel sheet with the following command

    =Progress_Status(Row())

    Calculate is set to Automatic. The cells type is General - Not Text (I read this may be the issue, but it is not)

    It calculates fine if I select the cell and press enter to re-enter the formula. But if I change any of the cells that the formuale uses it does not do anything, until I re-selct and re-press enter. I have tried doing it in various ways but no joy.

    The function is as follows:-
    Function Progress_Status(ByVal ThisRow As Integer) As String
    
    Dim Status As String
        Status = "On Target"
        If Cells(ThisRow, 13) = "Yes" Then
            Status = "Completed"
        ElseIf Cells(ThisRow, 14) = "On Hold" Then
            Status = "On Hold"
        ElseIf Cells(ThisRow, 13) = "No" And DateDiff("d", Cells(ThisRow, 12), Now) > 0 Then
            Status = "Delayed"
        ElseIf Cells(ThisRow, 11) = "No" And DateDiff("d", Cells(ThisRow, 10), Now) > 0 Then
            Status = "Delayed"
        ElseIf Cells(ThisRow, 9) = "No" And DateDiff("d", Cells(ThisRow, 8), Now) > 0 Then
            Status = "Delayed"
        ElseIf Cells(ThisRow, 7) = "No" And DateDiff("d", Cells(ThisRow, 6), Now) > 0 Then
            Status = "Delayed"
        End If
               
        Progress_Status = Status
    
    End Function
    Any help would be as always much appreciated
    Last edited by Wongadob; 07-13-2011 at 01:53 PM.

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