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

Hi All

I just working through a formula to breakdown salary i.e 50's 20's 10's ...

First 50's Formula =IF($B2="","",INT($B2/C$1))

Second 20's Formula
=IF($B2="","",INT(($B2-SUMPRODUCT(($C2:C2)*($C$1:C$1)))/D$1))

But this formula does not work with some instances. Please check the
attached excel worksheet for example.

Regards
Bhavesh





  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default INT Function

There's no attached spreadsheet in discussion groups. Explain what doesn't
work, what errors you're getting, etc.

Dave
--
Brevity is the soul of wit.


"Bhavesh Valand" wrote:

Hi All

I just working through a formula to breakdown salary i.e 50's 20's 10's ...

First 50's Formula =IF($B2="","",INT($B2/C$1))

Second 20's Formula
=IF($B2="","",INT(($B2-SUMPRODUCT(($C2:C2)*($C$1:C$1)))/D$1))

But this formula does not work with some instances. Please check the
attached excel worksheet for example.

Regards
Bhavesh




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

=IF($B2="","",INT($B2-(C2*C1)/D$1))

"Bhavesh Valand" wrote:

Hi All

I just working through a formula to breakdown salary i.e 50's 20's 10's ...

First 50's Formula =IF($B2="","",INT($B2/C$1))

Second 20's Formula
=IF($B2="","",INT(($B2-SUMPRODUCT(($C2:C2)*($C$1:C$1)))/D$1))

But this formula does not work with some instances. Please check the
attached excel worksheet for example.

Regards
Bhavesh




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

Bhavesh,

Checking out your attached spreadsheet, you are expecting 2 in cell M12.
Using the INT funcion rounds the number *DOWN* to the nearest integer, it
does not round it normally. If M11 was = 2 and < 3, M12 would be 2. But
M11's value is 1.9999999999996 (increased the decimal places to see the
actual value), so it is rounding it down to 1 (the number displayed is the
actual value rounded to the number of decimal places the format is set to).

For some reason, SUMPRODUCT is not calculating an exact amount (to 2 decimal
places--it is going 13 places). I wrapped a ROUND function around your
existing formula and it looks like to worked okay. I'm going to attach your
original attacment with my modifications to it (even though some one said
that we are not supposed to include attachments).

Hope this helps.

Conan



"Bhavesh Valand" wrote in message
...
Hi All

I just working through a formula to breakdown salary i.e 50's 20's 10's
...

First 50's Formula =IF($B2="","",INT($B2/C$1))

Second 20's Formula
=IF($B2="","",INT(($B2-SUMPRODUCT(($C2:C2)*($C$1:C$1)))/D$1))

But this formula does not work with some instances. Please check the
attached excel worksheet for example.

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
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
Creating a Custom Excel Function to Calculate Gini Coefficients [email protected] Excel Worksheet Functions 3 February 21st 06 10:15 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 09:04 AM.

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"