Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You're correct, I fubarred this one.
Pete_UK wrote: .... so the L1 term is outside the INT function. |
#14
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need some comments on my Utility_Move class module. | Excel Worksheet Functions | |||
Creating a Custom Excel Function to Calculate Gini Coefficients | Excel Worksheet Functions | |||
Date & Time | New Users to Excel | |||
Conversion | Excel Worksheet Functions | |||
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. | Excel Worksheet Functions |