BetaONE will rise again!


Reply
  #1  
Old 9th Nov 04, 05:35 AM
Shiromagius Shiromagius is offline
Senior Member
 
Join Date: Oct 2001
Location: Oregon
Posts: 244
Shiromagius
Send a message via ICQ to Shiromagius
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!
__________________
Shiromagius

Last edited by Shiromagius : 9th Nov 04 at 06:35 AM.
Reply With Quote
  #2  
Old 9th Nov 04, 07:22 AM
SlickVic78's Avatar
SlickVic78 SlickVic78 is offline
Senior Member
 
Join Date: Sep 2001
Location: New York, USA
Posts: 515
SlickVic78 is an unknown quantity at this point
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
__________________
  • Pentium 4 3.20GHz Processor
  • 1 Gig DDR 400MHz RAM
  • 100 Gig 7200 RPM Western Digital HDD
  • 80 Gig 7200 RPM Western Digital HDD
  • Lite-On LTR-52327S CD-RW Burner
  • Lite-On SOHW-1633S DVD Burner
  • ATI Radeon 9700 Pro
  • Sound Blaster Audigy
  • Microsoft Windows XP Pro SP-2
Reply With Quote
  #3  
Old 9th Nov 04, 10:38 AM
Shiromagius Shiromagius is offline
Senior Member
 
Join Date: Oct 2001
Location: Oregon
Posts: 244
Shiromagius
Send a message via ICQ to Shiromagius
Sounds good If anything I shoved you a good step in the right direction
__________________
Shiromagius
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:20 AM.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.