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.
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.
=FLOOR(A1/B1,SIGN(A1)*1)
Or, if you only have positive numbers,
=INT(A1/B1)
--
Kind regards,
Niek Otten
"WannaBeExceller" <WannaBeExceller@discussions.microsoft.com> wrote in
message news:450EBC77-8305-41CE-8CAA-D5DA97B4EBE2@microsoft.com...
>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.
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" <WannaBeExceller@discussions.microsoft.com> wrote in
> message news:450EBC77-8305-41CE-8CAA-D5DA97B4EBE2@microsoft.com...
> >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.
>
>
>
You can use
?INT(val1 / val2)
or
?val1 \ val2
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"WannaBeExceller" <WannaBeExceller@discussions.microsoft.com> wrote in
message news:450EBC77-8305-41CE-8CAA-D5DA97B4EBE2@microsoft.com...
> 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.
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" <WannaBeExceller@discussions.microsoft.com> wrote in
message news:450EBC77-8305-41CE-8CAA-D5DA97B4EBE2@microsoft.com...
> 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.
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" <twogilvy@msn.com> wrote in message
news:eJKV420JGHA.1132@TK2MSFTNGP10.phx.gbl...
> 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" <WannaBeExceller@discussions.microsoft.com> wrote in
> message news:450EBC77-8305-41CE-8CAA-D5DA97B4EBE2@microsoft.com...
> > 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.
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks