Hi Guys,
This is probably really simple, but I've tried and can't do it...
Basically, I've created a Function which Loops through a specified column and finds Positive Values, it then adds these values together and returns a 'Double' Variable.
It goes like this...
and the Cell Content is
The problem is, the bloody thing won't automatically update when one of it's dependant cells (i.e. in Column H) changes.
I have to double click on the cell containing the Function and press enter to force a re-calculation.
Column H itself is a Sum of the Previous 4 Columns on the same row.
Any help would be greatly appreciated...
Thanks in Advance.
Jag14
[tt]'Very funny, Scotty... Now Beam down my clothes.'[/tt]
This is probably really simple, but I've tried and can't do it...
Basically, I've created a Function which Loops through a specified column and finds Positive Values, it then adds these values together and returns a 'Double' Variable.
It goes like this...
Code:
Public Function CompletedDays(sColumn As String) As Double
Dim iLoop As Integer
Dim lAmount As Double
For iLoop = 5 To 35 Step 1
If Range(Trim(sColumn) & iLoop) <> 0 And _
Range(Trim(sColumn) & iLoop) <> "N/A" Then
dAmount = dAmount + Range(Trim(sColumn) & iLoop)
End If
Next iLoop
CompletedDays = dAmount
End Function
and the Cell Content is
Code:
=CompletedDays("H")
The problem is, the bloody thing won't automatically update when one of it's dependant cells (i.e. in Column H) changes.
I have to double click on the cell containing the Function and press enter to force a re-calculation.
Column H itself is a Sum of the Previous 4 Columns on the same row.
Any help would be greatly appreciated...
Thanks in Advance.
Jag14

[tt]'Very funny, Scotty... Now Beam down my clothes.'[/tt]