+ Reply to Thread
Results 1 to 4 of 4

Finding whether a number is a square, or whether square root is integer

Hybrid View

  1. #1
    Registered User
    Join Date
    07-17-2009
    Location
    Bristol England
    MS-Off Ver
    Excel 2007
    Posts
    46

    Finding whether a number is a square, or whether square root is integer

    Hi, I need a formula to tell me whether a number is a square number, or I can do it so to see if the square root of a number is an interger.

    So far Iv been doing

    A1 = √2
    A2 = AND(RIGHT(A1,1)=INT(A1))

    True or false outcome is fine, and it has been working fine on some examples, but the problem comes when I have √49, as it is 2 digits long. I've seen a formula similar to find the root symbol, and look at all the numbers upto this point (maybe FIND), could some one help me to do this?

    Either that or another formula would be good!

    Thanks
    Last edited by Geomarsh; 08-19-2009 at 08:52 AM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Finding whether a number is a square, or whether square root is integer

    How about this?

    =SQRT(RIGHT(A1,LEN(A1)-1))=INT(SQRT(RIGHT(A1,LEN(A1)-1)))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    07-17-2009
    Location
    Bristol England
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Finding whether a number is a square, or whether square root is integer

    Works brilliantly thanks!

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,696

    Re: Finding whether a number is a square, or whether square root is integer

    To chck if A1 is the square of an integer

    =MOD(A1^(1/2),1)=0

+ 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