BetaONE will rise again!

BetaONE will rise again! (http:\\b1.hcanet.com\forum/index.php)
-   Software Support (http:\\b1.hcanet.com\forum/forumdisplay.php?f=45)
-   -   Calling All Excel Gurus! :) (http:\\b1.hcanet.com\forum/showthread.php?t=14431)

Shiromagius 9th Nov 04 05:35 AM

Working on it, seems fairly simple. Will have the code in a few minutes

Edit: Try this..
In your B1 cell, try "=IF(A1/32-INT(A1/32) = 0.5, A1+A1/32,IF(MOD(A1,32)=0,A1+A1/32+0.5,CEILING(A1/32,0.5)+A1))"
I have tested this and all seems ok. It basically checks out the decimal of the fraction A1/32 and if it equals 0.5, it will add A1/32 to A1 (no rounding needed), otherwise if A1 is a multiple of 32, it will also add the multiple +0.5 to A1 (0.5 needed because the ceiling function will not round to 0.5 if A1/32 is a multiple of A1), and lastly it will round the fraction to the nearest 0.5 and add it to A1. Hopefully this will work. Again, I have done some testing on it, but you may want to do some more testing yourself, just to check my work. Feel free to respond if you have questions/problems.

Good luck! :)

SlickVic78 9th Nov 04 07:22 AM

Whoa Shiromagius,

This rocks! It is rather early in the AM here and I need to get some sleep. But I did do a few tests with the code you provided. It so far works. I had to tweak it a little since, lets say the number was 96. Since their is no decimal, I want it take the number as is and add it to the original number which would make it 99 (since 96/32 = 3).

So the code looks like this now (bolding what I changed):
Code:

=IF(A1/32-INT(A1/32) = 0.5, A1+A1/32,IF(MOD(A1,32)=0.1,A1+A1/32+0.5,CEILING(A1/32,0.5)+A1))
I will play with it some more later when I wake up. I'll be sure to contact you if I need further assistance!

Thanks again! :)

-SlickVic78

Shiromagius 9th Nov 04 10:38 AM

Sounds good :) If anything I shoved you a good step in the right direction ;)


All times are GMT +1. The time now is 02:24 PM.

Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.