#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default INT function

What does the INT function do in this formula:

=IF(F7<0,"N/A",(INT(MONTH(TODAY())-MONTH(G7))/$L$1)*F7)

So far as I can tell, =MONTH(TODAY())-MONTH(G7), where G7 is 9/22/2006,
yields an integer, namely, 1. Why, then, would INT be in front of it?

Dave
--
Brevity is the soul of wit.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default INT function

The formula also contains "divide the $L$1", which is also included in
the parens for the INT function. Does L1 contain a value that could
generate a non-integer number?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default INT function

Dave,

I agree with your supposition, so in answer to your question - I don't
know.

Have you tried to see what happens if you get rid of it?

Pete

Dave F wrote:
What does the INT function do in this formula:

=IF(F7<0,"N/A",(INT(MONTH(TODAY())-MONTH(G7))/$L$1)*F7)

So far as I can tell, =MONTH(TODAY())-MONTH(G7), where G7 is 9/22/2006,
yields an integer, namely, 1. Why, then, would INT be in front of it?

Dave
--
Brevity is the soul of wit.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default INT function

No, the closed bracket for the INT function is before the L1 term.

Pete

Dave O wrote:
The formula also contains "divide the $L$1", which is also included in
the parens for the INT function. Does L1 contain a value that could
generate a non-integer number?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default INT function

The INT function isn't really necessary here. If NOW() had been used instead
of TODAY the result would have had a fractional time value in addition to the
serial date number. In that case INT would have stripped the time value,
leaving only the serial date number, but even then it would have been
unnecessary.

--
Kevin Backmann


"Dave F" wrote:

What does the INT function do in this formula:

=IF(F7<0,"N/A",(INT(MONTH(TODAY())-MONTH(G7))/$L$1)*F7)

So far as I can tell, =MONTH(TODAY())-MONTH(G7), where G7 is 9/22/2006,
yields an integer, namely, 1. Why, then, would INT be in front of it?

Dave
--
Brevity is the soul of wit.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default INT function

Even more;

INT(MONTH(TODAY())

returns an integer

So indeed the INT seems superfluous

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Dave F" wrote in message ...
| What does the INT function do in this formula:
|
| =IF(F7<0,"N/A",(INT(MONTH(TODAY())-MONTH(G7))/$L$1)*F7)
|
| So far as I can tell, =MONTH(TODAY())-MONTH(G7), where G7 is 9/22/2006,
| yields an integer, namely, 1. Why, then, would INT be in front of it?
|
| Dave
| --
| Brevity is the soul of wit.


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default INT function

Agreed, thanks.
--
Brevity is the soul of wit.


"Pete_UK" wrote:

Dave,

I agree with your supposition, so in answer to your question - I don't
know.

Have you tried to see what happens if you get rid of it?

Pete

Dave F wrote:
What does the INT function do in this formula:

=IF(F7<0,"N/A",(INT(MONTH(TODAY())-MONTH(G7))/$L$1)*F7)

So far as I can tell, =MONTH(TODAY())-MONTH(G7), where G7 is 9/22/2006,
yields an integer, namely, 1. Why, then, would INT be in front of it?

Dave
--
Brevity is the soul of wit.



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default INT function

Hi--$L$1 is 48.0

In any event, it's not included in the INT() function. Take a look at the
formula again.

I've removed it from the formula and get the same result. The only thing I
can think of is that whoever originally made this spreadsheet either had a
use for it in its original form, or, else, didn't understand what INT is
supposed to do.

Dave
--
Brevity is the soul of wit.


"Dave O" wrote:

The formula also contains "divide the $L$1", which is also included in
the parens for the INT function. Does L1 contain a value that could
generate a non-integer number?


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default INT function

Actually, Dave O is on to something. The closed bracket for the L1 term IS
part of the INT() function. Whoever made this function really messed it up!
The odd thing is it's calculating correctly.

Dave
--
Brevity is the soul of wit.


"Pete_UK" wrote:

No, the closed bracket for the INT function is before the L1 term.

Pete

Dave O wrote:
The formula also contains "divide the $L$1", which is also included in
the parens for the INT function. Does L1 contain a value that could
generate a non-integer number?



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default INT function

Kevin,

I disagree again - MONTH(NOW()) will return 10 for today.

Pete

Kevin B wrote:
The INT function isn't really necessary here. If NOW() had been used instead
of TODAY the result would have had a fractional time value in addition to the
serial date number. In that case INT would have stripped the time value,
leaving only the serial date number, but even then it would have been
unnecessary.

--
Kevin Backmann


"Dave F" wrote:

What does the INT function do in this formula:

=IF(F7<0,"N/A",(INT(MONTH(TODAY())-MONTH(G7))/$L$1)*F7)

So far as I can tell, =MONTH(TODAY())-MONTH(G7), where G7 is 9/22/2006,
yields an integer, namely, 1. Why, then, would INT be in front of it?

Dave
--
Brevity is the soul of wit.




  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default INT function

Pete, what I said in the prior post is that the NOW() function would return a
fractional time amount, and of course, if enclosed in an INT the fractional
amount would be excluded from the result. So we're in agreement here.
However, INT is not necessary as MONTH(NOW()) will return an integer
regardless.

MONTH(NOW()) and MONTH(TODAY()) are going to return the same result, with
INT being excess baggage.
--
Kevin Backmann


"Pete_UK" wrote:

Kevin,

I disagree again - MONTH(NOW()) will return 10 for today.

Pete

Kevin B wrote:
The INT function isn't really necessary here. If NOW() had been used instead
of TODAY the result would have had a fractional time value in addition to the
serial date number. In that case INT would have stripped the time value,
leaving only the serial date number, but even then it would have been
unnecessary.

--
Kevin Backmann


"Dave F" wrote:

What does the INT function do in this formula:

=IF(F7<0,"N/A",(INT(MONTH(TODAY())-MONTH(G7))/$L$1)*F7)

So far as I can tell, =MONTH(TODAY())-MONTH(G7), where G7 is 9/22/2006,
yields an integer, namely, 1. Why, then, would INT be in front of it?

Dave
--
Brevity is the soul of wit.



  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default INT function

The way I see it, F7 multiplies something in brackets, i.e.

(INT(MONTH(TODAY())-MONTH(G7))/$L$1)

and that simplifies to:

INT(something) / $L$1

so the L1 term is outside the INT function.

Pete

Dave F wrote:
Actually, Dave O is on to something. The closed bracket for the L1 term IS
part of the INT() function. Whoever made this function really messed it up!
The odd thing is it's calculating correctly.

Dave
--
Brevity is the soul of wit.


"Pete_UK" wrote:

No, the closed bracket for the INT function is before the L1 term.

Pete

Dave O wrote:
The formula also contains "divide the $L$1", which is also included in
the parens for the INT function. Does L1 contain a value that could
generate a non-integer number?




  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default INT function

You're correct, I fubarred this one.


Pete_UK wrote:
....

so the L1 term is outside the INT function.


  #14   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default INT function

Yeah, you're right.
--
Brevity is the soul of wit.


"Pete_UK" wrote:

The way I see it, F7 multiplies something in brackets, i.e.

(INT(MONTH(TODAY())-MONTH(G7))/$L$1)

and that simplifies to:

INT(something) / $L$1

so the L1 term is outside the INT function.

Pete

Dave F wrote:
Actually, Dave O is on to something. The closed bracket for the L1 term IS
part of the INT() function. Whoever made this function really messed it up!
The odd thing is it's calculating correctly.

Dave
--
Brevity is the soul of wit.


"Pete_UK" wrote:

No, the closed bracket for the INT function is before the L1 term.

Pete

Dave O wrote:
The formula also contains "divide the $L$1", which is also included in
the parens for the INT function. Does L1 contain a value that could
generate a non-integer number?




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 11:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"