.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old October 16th, 2005, 07:47 PM

wilhil wilhil is offline
Sergeant
 
Join Date: Sep 2003
Posts: 258
Thanks: 0
Thanked 0 Times in 0 Posts
wilhil is on a distinguished road
Default quick excel help needed, and a treat very soon!

Hi

I am about to release a file that should help alot of you with your game and upgrades, to myknowledge there is not one like it here.

there is one thing I can not figure out, I have not been using excel in some time, anyway, how do I get rid of the decimal point and following figures in a cell but not make it round up?

I understand how to do it normally, but 1.9 will become 2, and I really need even 1.99999 to become 1, as it must be a whole number only.

can anyone help me here?

Thanks
Reply With Quote
  #2  
Old October 16th, 2005, 07:53 PM
Ed Kolis's Avatar

Ed Kolis Ed Kolis is offline
General
 
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
Ed Kolis is on a distinguished road
Default Re: quick excel help needed, and a treat very soon

TRUNC chops off the decimals.
INT rounds down.
There's a subtle difference, in that -2.5 will TRUNC to -2, but INT to -3.
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote
  #3  
Old October 16th, 2005, 07:59 PM

wilhil wilhil is offline
Sergeant
 
Join Date: Sep 2003
Posts: 258
Thanks: 0
Thanked 0 Times in 0 Posts
wilhil is on a distinguished road
Default Re: quick excel help needed, and a treat very soon

Thanks!

when you say about negative numbers, is that just for negatives, so 2.5 ints and truncs to 2, whilst 2.6 will int to 3 whilst trunc is 2?

if I get what you are saying, trunc is what I am looking for! thanks (int is not needed now, but useful to know! I have not really been going through the functions! but this is good!)
Reply With Quote
  #4  
Old October 16th, 2005, 08:13 PM
Ed Kolis's Avatar

Ed Kolis Ed Kolis is offline
General
 
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
Ed Kolis is on a distinguished road
Default Re: quick excel help needed, and a treat very soon

Not quite... 2.6 would also int to 2, because int rounds *down* no matter what. But that doesn't seem to be what you need, so that doesn't matter
What is this spreadsheet you're working on anyway? You said it had to do with the "game and upgrades" - do you mean modding families of components and such? If so I'd really love to see it... somehow I can't make myself use an *old* version of the templatizer, since I lost the latest version!
__________________
The Ed draws near! What dost thou deaux?
Reply With Quote
  #5  
Old October 16th, 2005, 08:24 PM
Slick's Avatar

Slick Slick is offline
Brigadier General
 
Join Date: Apr 2002
Location: Kailua, Hawaii
Posts: 1,860
Thanks: 0
Thanked 1 Time in 1 Post
Slick is on a distinguished road
Default Re: quick excel help needed, and a treat very soon

if you want to round in the traditional sense, add 0.5 then trunc.
__________________
Slick.
Reply With Quote
  #6  
Old October 16th, 2005, 09:08 PM

wilhil wilhil is offline
Sergeant
 
Join Date: Sep 2003
Posts: 258
Thanks: 0
Thanked 0 Times in 0 Posts
wilhil is on a distinguished road
Default Re: quick excel help needed, and a treat very soon

here is what I was making

http://www.shrapnelcommunity.com/thr...b=5&o=&fpart=1

I hope you enjoy, also, what is templatizer? is it something SE or general excel related?

and I dont get int then! is the only diffrence between int and trunc when you have negative numbers?

I havent done any good maths in years! and thank you trunc worked!
Reply With Quote
Reply

Bookmarks


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 04:24 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.