Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Rounding up to the nearest 6" increment

I need a function that rounds a number up to the nearest 6" increment

In other words, if the number to be rounded is 19" the value returned would
be 24". If the number is 20" the value returned would also be 24".

To complicate matters, if the number to be rounded up is less than or equal
to 2" then the the returned value needs to be then 2nd nearest 6" increment.

In other words, if the number to be rounded is 17" or 16" then the returned
value needs to be 24". 15" would round to 18", as would 14, 13, and 12. 10
and 11 would also round to 18".

Make sense? Hope so.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Rounding up to the nearest 6" increment

Give this a try to round cells in B1

=IF(MOD(B1, 6)=4, B1+12-MOD(B1, 6), B1+6-MOD(B1, 6))
--
HTH...

Jim Thomlinson


"GreenMonster" wrote:

I need a function that rounds a number up to the nearest 6" increment

In other words, if the number to be rounded is 19" the value returned would
be 24". If the number is 20" the value returned would also be 24".

To complicate matters, if the number to be rounded up is less than or equal
to 2" then the the returned value needs to be then 2nd nearest 6" increment.

In other words, if the number to be rounded is 17" or 16" then the returned
value needs to be 24". 15" would round to 18", as would 14, 13, and 12. 10
and 11 would also round to 18".

Make sense? Hope so.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Rounding up to the nearest 6" increment

=ROUNDUP(A2/6,0)*6

or

=CEILING(A2,6)

--
HTH

Bob Phillips

"GreenMonster" wrote in message
...
I need a function that rounds a number up to the nearest 6" increment

In other words, if the number to be rounded is 19" the value returned

would
be 24". If the number is 20" the value returned would also be 24".

To complicate matters, if the number to be rounded up is less than or

equal
to 2" then the the returned value needs to be then 2nd nearest 6"

increment.

In other words, if the number to be rounded is 17" or 16" then the

returned
value needs to be 24". 15" would round to 18", as would 14, 13, and 12.

10
and 11 would also round to 18".

Make sense? Hope so.

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Rounding up to the nearest 6" increment

I must admit to not having understood that other part, but it seems you did.

Bob

"Jim Thomlinson" wrote in message
...
Give this a try to round cells in B1

=IF(MOD(B1, 6)=4, B1+12-MOD(B1, 6), B1+6-MOD(B1, 6))
--
HTH...

Jim Thomlinson



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default Rounding up to the nearest 6" increment

yep, jim's seems to work fine

--


Gary


"Bob Phillips" wrote in message
...
I must admit to not having understood that other part, but it seems you
did.

Bob

"Jim Thomlinson" wrote in message
...
Give this a try to round cells in B1

=IF(MOD(B1, 6)=4, B1+12-MOD(B1, 6), B1+6-MOD(B1, 6))
--
HTH...

Jim Thomlinson





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
Rounding up to nearest 500 Heather Excel Discussion (Misc queries) 9 April 3rd 23 10:41 AM
ROUNDING UP TO NEAREST 9 JUDY Excel Discussion (Misc queries) 5 March 25th 09 12:28 PM
Rounding up to the nearest 1/8" rudyeb Excel Discussion (Misc queries) 1 May 20th 08 07:09 PM
I need a formula with rounding up & rounding down to the nearest . Tony Kay Excel Worksheet Functions 3 May 29th 07 11:13 PM
Rounding to Nearest 250 Scott G Excel Worksheet Functions 6 February 21st 06 04:12 PM


All times are GMT +1. The time now is 12:12 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"