Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default Round to up to a threshold

However, I need to set an upper limit on how high a ceiling function will
round.

For instance: h2= -180 and k2=24
=ceiling(ABS(H2),K2)

This formula would give me 192. However, I need a third varable as an upper
limit. For instance, I cannot have the answer from the previous equation go
above 100. Therefore, the answer to the equation would be 96.
=ceiling(ABS(H2),K2) where that answer is less than or equal to L2

Any and all help is apprecitated!




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Round to up to a threshold

Try this:

=MIN(CEILING(ABS(H2),K2),100)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"jeffbert" wrote:

However, I need to set an upper limit on how high a ceiling function will
round.

For instance: h2= -180 and k2=24
=ceiling(ABS(H2),K2)

This formula would give me 192. However, I need a third varable as an upper
limit. For instance, I cannot have the answer from the previous equation go
above 100. Therefore, the answer to the equation would be 96.
=ceiling(ABS(H2),K2) where that answer is less than or equal to L2

Any and all help is apprecitated!




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Round to up to a threshold

One of these two formulas should work for you, depending if you want L2
subject to the significance of K2 or not.

=MIN(CEILING(ABS(H2),K2),L2)

=MIN(CEILING(ABS(H2),K2),INT(L2/K2)*K2)

HTH,
Elkar


"jeffbert" wrote:

However, I need to set an upper limit on how high a ceiling function will
round.

For instance: h2= -180 and k2=24
=ceiling(ABS(H2),K2)

This formula would give me 192. However, I need a third varable as an upper
limit. For instance, I cannot have the answer from the previous equation go
above 100. Therefore, the answer to the equation would be 96.
=ceiling(ABS(H2),K2) where that answer is less than or equal to L2

Any and all help is apprecitated!




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Round to up to a threshold

Actually, to have the formula max controlled by cell L2.....like you asked
for....


=MIN(CEILING(ABS(H2),K2),L2)
Where
H2 contains the source value
K2 contains the increment to calculate
L2 contains the upper limit of the calculation

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"jeffbert" wrote:

However, I need to set an upper limit on how high a ceiling function will
round.

For instance: h2= -180 and k2=24
=ceiling(ABS(H2),K2)

This formula would give me 192. However, I need a third varable as an upper
limit. For instance, I cannot have the answer from the previous equation go
above 100. Therefore, the answer to the equation would be 96.
=ceiling(ABS(H2),K2) where that answer is less than or equal to L2

Any and all help is apprecitated!




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default Round to up to a threshold

Thanks for the help, I used your second solution, in order to keep the
significance of K2. I appreciate the quick and accurate response.


"Elkar" wrote:

One of these two formulas should work for you, depending if you want L2
subject to the significance of K2 or not.

=MIN(CEILING(ABS(H2),K2),L2)

=MIN(CEILING(ABS(H2),K2),INT(L2/K2)*K2)

HTH,
Elkar


"jeffbert" wrote:

However, I need to set an upper limit on how high a ceiling function will
round.

For instance: h2= -180 and k2=24
=ceiling(ABS(H2),K2)

This formula would give me 192. However, I need a third varable as an upper
limit. For instance, I cannot have the answer from the previous equation go
above 100. Therefore, the answer to the equation would be 96.
=ceiling(ABS(H2),K2) where that answer is less than or equal to L2

Any and all help is apprecitated!






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Round to up to a threshold

I see that YOU read the entire post...
whereas, I apparently did not. :\

***********
Regards,
Ron

XL2002, WinXP


"Elkar" wrote:

One of these two formulas should work for you, depending if you want L2
subject to the significance of K2 or not.

=MIN(CEILING(ABS(H2),K2),L2)

=MIN(CEILING(ABS(H2),K2),INT(L2/K2)*K2)

HTH,
Elkar


"jeffbert" wrote:

However, I need to set an upper limit on how high a ceiling function will
round.

For instance: h2= -180 and k2=24
=ceiling(ABS(H2),K2)

This formula would give me 192. However, I need a third varable as an upper
limit. For instance, I cannot have the answer from the previous equation go
above 100. Therefore, the answer to the equation would be 96.
=ceiling(ABS(H2),K2) where that answer is less than or equal to L2

Any and all help is apprecitated!




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default Round to up to a threshold

Ron

Thanks for the reply. I tried your solution, but it does not keep the
significance of K2. I used this solution from Elkar.

=MIN(CEILING(ABS(H2),K2),INT(L2/K2)*K2)


"Ron Coderre" wrote:

Actually, to have the formula max controlled by cell L2.....like you asked
for....


=MIN(CEILING(ABS(H2),K2),L2)
Where
H2 contains the source value
K2 contains the increment to calculate
L2 contains the upper limit of the calculation

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"jeffbert" wrote:

However, I need to set an upper limit on how high a ceiling function will
round.

For instance: h2= -180 and k2=24
=ceiling(ABS(H2),K2)

This formula would give me 192. However, I need a third varable as an upper
limit. For instance, I cannot have the answer from the previous equation go
above 100. Therefore, the answer to the equation would be 96.
=ceiling(ABS(H2),K2) where that answer is less than or equal to L2

Any and all help is apprecitated!




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
Round time maybe this explanation will help Darts Excel Discussion (Misc queries) 1 March 22nd 06 09:57 PM
ROUND or "Precision as displayed"? bb Excel Worksheet Functions 2 March 2nd 06 04:53 AM
round up a function RESULT Lynne Excel Discussion (Misc queries) 4 November 10th 05 04:59 PM
Round a number in nested function kim Excel Worksheet Functions 1 July 6th 05 11:45 AM
Round whole numbers up and down JoeBed Excel Discussion (Misc queries) 4 July 5th 05 05:21 PM


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

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

About Us

"It's about Microsoft Excel"