Square root with a remainder

X

xcgames

::Hi all, I'm looking for a little help here with sqrt in excel.

I know that sqrt function returns a decimal as an answer, but I'm
looking for something slight different. Is there a way to make the
fucntion return an integer, with a remainder? :rolleyes:

For example,
D = Q^2 + R
1 = 1 + 0
2 = 1 + 1
3 = 1 + 2
4 = 2 + 0

and so on

So let's say I give the function a 5, I'm expecting a 2 for Q and 1 for
remainder.::
 
D

daddylonglegs

Sorry that should have been.....

If you have a number in A1 then in B1

=INT(SQRT(A1)) and in C1

=A1-(B1^2)

....if you want it all in one cell

=INT(SQRT(A1))&"+"&A1-INT(SQRT(A1))^2
 
H

Harlan Grove

Aladin Akyurek wrote...
A2: 5

B2:

=QUOTIENT(SQRT(A2),1)

C2:

=A2-B2^2
....

QUOTIENT rather than INT seems willfully inefficient.

As for the remainder, why not

=MOD(A2,B2)

well aside from the severe limitations in MOD?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top