Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default INT Function Returns 1

Hi

I have this odd problem with INT function returns 1, when it needs to return
2.

i have a cell (M10) value £0.04 based on a formula
=$B3-SUMPRODUCT(($C3:L3)*($C$1:L$1)) and cell M11 value 2 based on a formula
=M10/M1.

The cell M12 =INT(M11) returns 1 but it should return 2 because =Int(2)
returns 2

Is anyone can explain me why this happening and what is workaround to fix
this issue?

If anyone would like have a look at the excel file, then i'm happy email over.

Regards
Bhavesh
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 427
Default INT Function Returns 1

First are you sure that M11 is 2 ?
If it was 1.99 then it could display as 2

In this case INT(1.99) is 1
The trick is to add a small decimal value before doing the INT()

ie M12=INT(M11+0.1)

It is always a good idea to have an idea of what the actuall values are
going to be when using INT().
You should have some idea of what INT() on 1.4, 1.5 1.9 etc should return.

A different way is to ROUND() the value of M11, it depends on what your
values
are in M11, and what you want to do :)

Steve


On Fri, 29 Dec 2006 10:24:00 -0000, Bhavesh
wrote:

Hi

I have this odd problem with INT function returns 1, when it needs to
return
2.

i have a cell (M10) value £0.04 based on a formula
=$B3-SUMPRODUCT(($C3:L3)*($C$1:L$1)) and cell M11 value 2 based on a
formula
=M10/M1.

The cell M12 =INT(M11) returns 1 but it should return 2 because =Int(2)
returns 2

Is anyone can explain me why this happening and what is workaround to fix
this issue?

If anyone would like have a look at the excel file, then i'm happy email
over.

Regards
Bhavesh

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default INT Function Returns 1

Hi Bhavesh

You may find that 2 is not really 2 but 1.99999999999 and it is rounded for
the display.

You could try expanding the format to 0.000000000000000000 to see what you
get or do the following:

[M11]=round(m10/m1,2)

and see what the answer is.

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Bhavesh" wrote:

Hi

I have this odd problem with INT function returns 1, when it needs to return
2.

i have a cell (M10) value £0.04 based on a formula
=$B3-SUMPRODUCT(($C3:L3)*($C$1:L$1)) and cell M11 value 2 based on a formula
=M10/M1.

The cell M12 =INT(M11) returns 1 but it should return 2 because =Int(2)
returns 2

Is anyone can explain me why this happening and what is workaround to fix
this issue?

If anyone would like have a look at the excel file, then i'm happy email over.

Regards
Bhavesh

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 837
Default INT Function Returns 1

What does =(M11-2) return?

My guess is that it will be negative, indicating that INT is working properly.

What does =(M10-0.04) return?
What does =(M1-0.02) return?

Note that the parentheses in these formulas should be used to prevent Excel
from being overly "helpful". Without the parentheses, Excel might hide the
information that is needed in this instance.

Jerry

"Bhavesh" wrote:

Hi

I have this odd problem with INT function returns 1, when it needs to return
2.

i have a cell (M10) value £0.04 based on a formula
=$B3-SUMPRODUCT(($C3:L3)*($C$1:L$1)) and cell M11 value 2 based on a formula
=M10/M1.

The cell M12 =INT(M11) returns 1 but it should return 2 because =Int(2)
returns 2

Is anyone can explain me why this happening and what is workaround to fix
this issue?

If anyone would like have a look at the excel file, then i'm happy email over.

Regards
Bhavesh

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
IF function which returns the text from a cell Wilhelm Excel Worksheet Functions 1 July 6th 06 09:14 AM
month worksheet function returns wrong value Barry Excel Worksheet Functions 6 January 28th 06 12:37 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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