Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a quotient function in VBA that's like Mod
I am trying to do a division but only want the quotient part. I thought there
would be a DIV function that works like MOD function. Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a quotient function in VBA that's like Mod
=FLOOR(A1/B1,SIGN(A1)*1)
Or, if you only have positive numbers, =INT(A1/B1) -- Kind regards, Niek Otten "WannaBeExceller" wrote in message ... I am trying to do a division but only want the quotient part. I thought there would be a DIV function that works like MOD function. Thanks in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a quotient function in VBA that's like Mod
You can use
?INT(val1 / val2) or ?val1 \ val2 -- HTH Bob Phillips (remove nothere from email address if mailing direct) "WannaBeExceller" wrote in message ... I am trying to do a division but only want the quotient part. I thought there would be a DIV function that works like MOD function. Thanks in advance. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a quotient function in VBA that's like Mod
Thank you for your response. I found that to work as well as just using the
"\" sign in the division instead of using "/". Thank you once again. "Niek Otten" wrote: =FLOOR(A1/B1,SIGN(A1)*1) Or, if you only have positive numbers, =INT(A1/B1) -- Kind regards, Niek Otten "WannaBeExceller" wrote in message ... I am trying to do a division but only want the quotient part. I thought there would be a DIV function that works like MOD function. Thanks in advance. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a quotient function in VBA that's like Mod
Dividend ÷ Divisor = Quotient
If you really mean the quotient, then for a worksheet formula =6/3 would return 3 in VBA res = 6/3 res would contain 2 dim res as double res = 5/3 res would contain 1.66666666666667 or there abouts. from the immediate window: res#=5/3 ? res 1.66666666666667 -- Regards, Tom Ogilvy "WannaBeExceller" wrote in message ... I am trying to do a division but only want the quotient part. I thought there would be a DIV function that works like MOD function. Thanks in advance. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a quotient function in VBA that's like Mod
Just to ADD:
http://mathworld.wolfram.com/Quotient.html My answer interpreted Quotient with the most common interpretation. If you want the whole number portion of a division i.e, If you want the Integer portion of the Quotient <g, then look in Excel VBA help at TRUNC and INT in VBA, use integer division ( \ ) ? 6\4 1 ? -6\4 -1 -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Dividend ÷ Divisor = Quotient If you really mean the quotient, then for a worksheet formula =6/3 would return 3 in VBA res = 6/3 res would contain 2 dim res as double res = 5/3 res would contain 1.66666666666667 or there abouts. from the immediate window: res#=5/3 ? res 1.66666666666667 -- Regards, Tom Ogilvy "WannaBeExceller" wrote in message ... I am trying to do a division but only want the quotient part. I thought there would be a DIV function that works like MOD function. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i round a quotient to specific decimal places? | Excel Worksheet Functions | |||
Why QUOTIENT function is not being recognized? | Excel Worksheet Functions | |||
quotient function prob. i have copied example but it gives error | Excel Discussion (Misc queries) | |||
Make divisions and display no decimal value at the quotient! | Excel Discussion (Misc queries) | |||
How do I set a mimimum quotient value? | Excel Worksheet Functions |