Hi
Thank for pointing out the flaw.
Yes, you are correct, but at the same time your formula is not dealing
with the range that Kenneth posted, which was that the dose could be
between 0.067 x body weight and 0.1 x bodyweight.
My formula should be adjusted to
=IF(D3*0.067<0.2,"0.2 - 0.3 mg",IF(OR(D3*0.0673,D3*0.13)," 2.0 - 3.0
mg",
TEXT(D3*0.067,"0.0")&" - "&TEXT(D3*0.1,"0.0")&" mg"))
which would return 2.0 - 3.0 mg for a 42 kilo bodyweight
or maybe
=IF(D3*0.067<0.2,"0.2 - 0.3 mg",IF(D3*0.0673," 2.0 - 3.0 mg",
TEXT(D3*0.067,"0.0")&" - "&TEXT(MIN(3,D3*0.1),"0.0")&" mg"))
which would return 2.9 - 3.0 mg
The former might lead to a recommendation of too low a dose for that
weight if the minimum were adopted, whilst clearly the flaw in my
original solution, which you so rightly pointed out, could lead to a
dose rate exceeding the maximum recommendation.
If a range is not required for the intermediates, then of course you
solution provides the exact dose rate.
Only Kenneth can decide which of the alternatives he requires.
--
Regards
Roger Govier
"avveerkar"
wrote in message
...[color=blue]
kenneth Wrote:
Brilliant!
Sorry for the post in 2 places.
"Roger Govier" wrote:
Hi Kenneth
If I understand you correctly then
=IF(D3*0.067<0.2,"0.2 - 0.3 mg",IF(D3*0.0673," 2.0 - 3.0 mg",
TEXT(D3*0.067,"0.0")&" - "&TEXT(D3*0.1,"0.0")&" mg"))
will provide your requirements.
--
Regards
Roger Govier
Roger,
I think there is an error. For example if D3 is say 42 your formula
would give "2.8 - 4.2 mg " which is not what Kenneth wants. I think
he
wants actual value upto 3 and "2 - 3 mg" if it exceeds 3.
There is an error in my formula as well. Instead of 0.67 it should
read
.067 everywhere. It should be
IF(0.067*D3<=0.2, "0.2-0.3 mg", IF(0.067*D33, "2.0-3.0
mg",TEXT(D3*0.067,"0.0")&" mg"))
A V Veerkar
--
avveerkar
------------------------------------------------------------------------
avveerkar's Profile:
http://www.excelforum.com/member.php...o&userid=30338
View this thread:
http://www.excelforum.com/showthread...hreadid=509499