+ Reply to Thread
Results 1 to 4 of 4

Separate Numbers into Digits^3

  1. #1
    Registered User
    Join Date
    11-23-2012
    Location
    Montreal, Quebec
    MS-Off Ver
    Excel 2010
    Posts
    10

    Separate Numbers into Digits^3

    I need to create a loop (1 To n) that separates numbers into (digits)^3.
    Then, if the sum of the digits^3 = the original number it should print it.

    Let's say the number 153.

    1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153. So that number should be printed.
    Last edited by Sam9530130; 11-24-2012 at 02:28 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Separate Numbers into Digits^3

    Hi

    How about

    Please Login or Register  to view this content.
    rylo

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Separate Numbers into Digits^3

    What are you trying to achieve?

    I haven't done a mathematic proof, but it looks to me that there are only 4 numbers, excluding 0 and 1, that meet your condition.

    153
    370
    371
    407

    This workbook is setup to test from 1 to 100,000

    Select from the drop-down in A1 to check the results.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    11-23-2012
    Location
    Montreal, Quebec
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Separate Numbers into Digits^3

    Quote Originally Posted by rylo View Post
    Hi

    How about

    Please Login or Register  to view this content.
    rylo
    Yes this is good, thank you very much.

+ 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