Re: Countnumberofdays while function = TRUE
- From: "Maarten" <Maarten@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 07:11:28 -0800
How do I enter this in Excel? Is it possible to write a function with it?
Something like (I don't know how I have to write a correct function):
Function GrowDay(Wstart, Wstop)
x = 1
x = 0
W = Wstart
Do
x = x + 1
res = W(x - 1) + _
(0.1 * W(x - 1) ^ (2 / 3) - 0.05 * W(x - 1)) * f(Temp)
Loop While res <= Wstop
End Function
Maarten
"Tom Ogilvy" wrote:
> x = 1
> x = 0
> do
> x = x + 1
> res = W(x-1) + _
> (0.1*W(x-1)^(2/3)-0.05*W(x-1))*f(Temp)
> Loop while res <= 10
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Maarten" <Maarten@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:608AE9E0-B7C8-4B72-A5F2-BDFD5CFE7D42@xxxxxxxxxxxxxxxx
> > But B doesn't contain the weights of the animals. The weights should be
> > calculated invisible, behind each cell in B.
> > B1 may only contain the number of days the animal needs to reach a weight
> of
> > 10 grams, assuming that it enters the simulation on the day that
> corresponds
> > to cell B1
> >
> > B2 may only contain the number of days the animal needs to reach a weight
> of
> > 10 grams, assuming that it enters the simulation on the day that
> corresponds
> > to cell B2
> >
> > B3 may only contain the number of days the animal needs to reach a weight
> of
> > 10 grams, assuming that it enters the simulation on the day that
> corresponds
> > to cell B3
> >
> > etc...
> >
> >
> >
> >
> > "Tom Ogilvy" wrote:
> >
> > > If each row is a day, then it should be as simple as:
> > > =countif(B:B,"<=10")
> > >
> > > No macro required.
> > >
> > > As a further example, If you want to count >10 and <=20
> > >
> > > =Countif(B:B,">10")-Countif(B:B,">20")
> > >
> > >
> > >
> > > --
> > > Regards,
> > > Tom Ogilvy
> > >
>
>
>
.
- Follow-Ups:
- Re: Countnumberofdays while function = TRUE
- From: Tom Ogilvy
- Re: Countnumberofdays while function = TRUE
- References:
- Countnumberofdays while function = TRUE
- From: Maarten
- Re: Countnumberofdays while function = TRUE
- From: Tom Ogilvy
- Re: Countnumberofdays while function = TRUE
- From: Maarten
- Re: Countnumberofdays while function = TRUE
- From: Tom Ogilvy
- Countnumberofdays while function = TRUE
- Prev by Date: Re: If function?
- Next by Date: Whats wrong with this code?
- Previous by thread: Re: Countnumberofdays while function = TRUE
- Next by thread: Re: Countnumberofdays while function = TRUE
- Index(es):
Relevant Pages
|