$$Excel-Macros$$ Re: Custom Function

2011-07-03 Thread SRemains
If Count > 1 Then If ProductTWR(Count) < ProductTWR(Count - 1) Then Optimal_F = FVariable - 0.01 Exit Function End If End If Count = Count + 1 Next '/Optimal_F = FVariable - 0.0

$$Excel-Macros$$ Custom Function

2011-06-30 Thread SRemains
I'm attempting a function that has a loop within a loop, to iterate an optimal value. I'm not seeing why it's not calculating. It returns #value! On spreadsheet, the following cashflow 100 -500 1500 -600 Option Explicit Option Base 1 Public Function OptimalF(ByVal MyCells As Double) As Double

$$Excel-Macros$$ Re: Pausing to allow calculation

2011-01-08 Thread SRemains
David, I just joined this group today, but I think I might have a solution for you. First, you'll need to make a Public Declaration: Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Next, the following private sub Sub Sleep_5_Seconds() Sleep (5000) End Sub You can s