+ Reply to Thread
Results 1 to 5 of 5

Square root with a remainder

  1. #1
    Registered User
    Join Date
    03-26-2006
    Posts
    3

    Square root with a remainder

    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?

    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.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If you have a number in A1 then in B1

    =INT(SQRT(A1)) and in C1

    =A1-(B1^2)
    Last edited by daddylonglegs; 03-26-2006 at 05:03 PM.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    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

  4. #4
    Registered User
    Join Date
    03-26-2006
    Posts
    3
    dude i love you man, for that fast reply

    thank you veryyy verrry much!
    Last edited by xcgames; 03-26-2006 at 05:14 PM.

  5. #5
    Chip Pearson
    Guest

    Re: Square root with a remainder

    Try

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


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "xcgames" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > ::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?
    >
    > 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.::
    >
    >
    > --
    > xcgames
    > ------------------------------------------------------------------------
    > xcgames's Profile:
    > http://www.excelforum.com/member.php...o&userid=32842
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=526348
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1