Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kenneth
 
Posts: n/a
Default math formula with upper and lower limits on data but also ranges

sorry if this is too simple.
I would like to write a formula which will calculate a dose range of
medication based on patient's weight. I would like the data displayed such
that it would read (0.2-0.3 mg). This formula needs to have upper an lower
limits on the dose. THe dose cannont be lower than 0.2 nor higher than 3,
but all values in between should show.

here is what I have so far. I am unable for figure out how to impose the
upper limit. D3 location of user defined patient weight.


=CONCATENATE(IF(PRODUCT(0.067,D3)<=0.2,VALUE(0.2), IF(PRODUCT(0.067,D3)0.2,VALUE(PRODUCT(0.067,D3))& "-"&CONCATENATE(IF(PRODUCT(0.1,D3)<=0.3,VALUE(0.3),I F(PRODUCT(0.2,D3)0.3,VALUE(PRODUCT(0.2,D3))))))))


I had one suggestion but it did not provide the correct result:

"Tom Ogilvy" wrote:

Possibly:

=if(D3*.067<=.2,"0.2 mg",if(D3*.067.3,"0.3 mg","0.2-0.3 mg"))

--
Regards,
Tom Ogilvy



Thanks for the suggestion. The formula will not provide the true value for
results that are 0.2 but less than 3. I would like to have the result show
as a range of true values between 0.2 and 3 but if the values are < 0.2 then
0.2-0.3 should be the out put and if the values are 3, then 2-3 should be
the output.

any insight?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dav
 
Posts: n/a
Default math formula with upper and lower limits on data but also ranges


I am not sure if you stated you question clearly. I would have given the
response of the previous reply, but if you mean the calculation is
performed for results between 0.2 and 0.3 try

=IF(D3*0.067<=0.2,"0.2 mg",IF(D3*0.0670.3,"0.3 mg",ROUND(D3*0.067,2)&"
mg"))

the round funcation can be removed or adjusted depending on the dp you
require. currently its 2

Regards

DAv


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=510007

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default math formula with upper and lower limits on data but also ranges

see response posted a few minutes ago to your original question in
excel.programming

--
Regards

Roger Govier


"kenneth" wrote in message
...
sorry if this is too simple.
I would like to write a formula which will calculate a dose range of
medication based on patient's weight. I would like the data displayed
such
that it would read (0.2-0.3 mg). This formula needs to have upper an
lower
limits on the dose. THe dose cannont be lower than 0.2 nor higher
than 3,
but all values in between should show.

here is what I have so far. I am unable for figure out how to impose
the
upper limit. D3 location of user defined patient weight.


=CONCATENATE(IF(PRODUCT(0.067,D3)<=0.2,VALUE(0.2), IF(PRODUCT(0.067,D3)0.2,VALUE(PRODUCT(0.067,D3))& "-"&CONCATENATE(IF(PRODUCT(0.1,D3)<=0.3,VALUE(0.3),I F(PRODUCT(0.2,D3)0.3,VALUE(PRODUCT(0.2,D3))))))))


I had one suggestion but it did not provide the correct result:

"Tom Ogilvy" wrote:

Possibly:

=if(D3*.067<=.2,"0.2 mg",if(D3*.067.3,"0.3 mg","0.2-0.3 mg"))

--
Regards,
Tom Ogilvy



Thanks for the suggestion. The formula will not provide the true
value for
results that are 0.2 but less than 3. I would like to have the
result show
as a range of true values between 0.2 and 3 but if the values are <
0.2 then
0.2-0.3 should be the out put and if the values are 3, then 2-3
should be
the output.

any insight?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kenneth
 
Posts: n/a
Default math formula with upper and lower limits on data but also rang

thank you.

"Roger Govier" wrote:

see response posted a few minutes ago to your original question in
excel.programming

--
Regards

Roger Govier


"kenneth" wrote in message
...
sorry if this is too simple.
I would like to write a formula which will calculate a dose range of
medication based on patient's weight. I would like the data displayed
such
that it would read (0.2-0.3 mg). This formula needs to have upper an
lower
limits on the dose. THe dose cannont be lower than 0.2 nor higher
than 3,
but all values in between should show.

here is what I have so far. I am unable for figure out how to impose
the
upper limit. D3 location of user defined patient weight.


=CONCATENATE(IF(PRODUCT(0.067,D3)<=0.2,VALUE(0.2), IF(PRODUCT(0.067,D3)0.2,VALUE(PRODUCT(0.067,D3))& "-"&CONCATENATE(IF(PRODUCT(0.1,D3)<=0.3,VALUE(0.3),I F(PRODUCT(0.2,D3)0.3,VALUE(PRODUCT(0.2,D3))))))))


I had one suggestion but it did not provide the correct result:

"Tom Ogilvy" wrote:

Possibly:

=if(D3*.067<=.2,"0.2 mg",if(D3*.067.3,"0.3 mg","0.2-0.3 mg"))

--
Regards,
Tom Ogilvy



Thanks for the suggestion. The formula will not provide the true
value for
results that are 0.2 but less than 3. I would like to have the
result show
as a range of true values between 0.2 and 3 but if the values are <
0.2 then
0.2-0.3 should be the out put and if the values are 3, then 2-3
should be
the output.

any insight?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing file in all upper case to upper and lower case Sagit Excel Discussion (Misc queries) 15 May 30th 07 06:08 AM
Convert lower case charecters to upper case Dinesh Excel Discussion (Misc queries) 3 September 10th 05 12:59 PM
List vector using upper and lower limits flaterp Excel Discussion (Misc queries) 6 June 10th 05 11:17 PM
How do I convert all upper case excel sheet into upper and lower . DebDay Excel Discussion (Misc queries) 1 March 9th 05 08:31 PM
How do I easily draw in Excel the Upper and Lower limits of a con. Judy Charts and Charting in Excel 3 January 12th 05 09:21 AM


All times are GMT +1. The time now is 12:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"