Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Make a decimal number return to zero

I am looking to make a decimal number return to zero. Example

if AI EQUALS 37.5

I want to do a formula that divides AI by 2 and when it comes out to 18.75 which is not a whole number then it should state the cell as zero if it is a whole number then it would return the whole number to that cell.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 153
Default Make a decimal number return to zero

On Wednesday, October 19, 2016 at 10:36:20 AM UTC-7, wrote:
I am looking to make a decimal number return to zero. Example

if AI EQUALS 37.5

I want to do a formula that divides AI by 2 and when it comes out to 18.75
which is not a whole number then it should state the cell as zero if it is
a whole number then it would return the whole number to that cell.


Maybe something like this:
=IF((A1/2) = INT(A1/2), A1/2, 0)
  #3   Report Post  
Junior Member
 
Location: Winters CA
Posts: 22
Default

Quote:
Originally Posted by View Post
I am looking to make a decimal number return to zero. Example

if AI EQUALS 37.5

I want to do a formula that divides AI by 2 and when it comes out to 18.75 which is not a whole number then it should state the cell as zero if it is a whole number then it would return the whole number to that cell.
I'm not sure if you are looking for =INT(A1/2)

or =(A1/2)*(1-SIGN(MOD(A1/2,1))
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
make excel automatically add a decimal Darrell Eddy Excel Worksheet Functions 1 March 20th 08 06:32 PM
how to make value whole (remove decimal point) Roger Excel Worksheet Functions 1 July 18th 07 11:20 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 07:20 PM
Make divisions and display no decimal value at the quotient! FreakyShadow Excel Discussion (Misc queries) 2 March 5th 06 06:28 AM
How to convert a decimal number to a non-decimal number? snickers22 Excel Worksheet Functions 4 January 13th 05 11:04 PM


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

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"