answersLogoWhite

0


Best Answer

Armstrong numbers are the sum of their own digits to the power of the number of digits. Here are all the possible Armstrong Numbers up to six digits:

1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474, 54748, 92727, 93084, 548834

EXAMPLE: 153 = 13 + 53 + 33

Sometimes, the simple solutions are better than complicated elegant solutions. Just compare your number to the list. If your number is on the list, it is an Armstrong Number.

Designing a spreadsheet formula to compare all numbers 1-6 digits to determine if they are one of twenty possible numbers does not make sence. However, in the spirit of education (even though using this solution does not pass the common sense test), here are two methods you can use to solve this problem.

SOLUTION #1 (easy): Compare against a look-up table.

=IF(ISERROR(VLOOKUP(A1,C1:C20,1,FALSE)),"No","Yes")

  1. Reserve A1 for entry of the number to be evaulated.
  2. In B1, enter this formula: =IF(ISERROR(VLOOKUP(A1,C1:C20,1,FALSE)),"No","Yes")
  3. In column C (C1:C20), enter the first twenty Armstrong Numbers [see list above].
  4. Enter a number in A1 and observe "Yes" or "No" in B1.

SOLUTION #2 (difficult): Brute force calculation.

=IF(LEN(F1)=6,IF(MID(F1,1,1)^6+MID(F1,2,1)^6+MID(F1,3,1)^6+MID(F1,4,1)^6+MID(F1,5,1)^6+MID(F1,6,1)^6=F1,"Yes","No"),"Not 6 places")

Here is an example for 6-digit numbers (use the same procedure for other size numbers or write a macro that will count the characters and loop through as many times as necessary):

  1. Reserve A1 for entry of the number to be evaulated.
  2. In B1, enter this formula:

    =IF(LEN(F1)=6,IF(MID(F1,1,1)^6+MID(F1,2,1)^6+MID(F1,3,1)^6+MID(F1,4,1)^6+MID(F1,5,1)^6+MID(F1,6,1)^6=F1,"Yes","No"),"Not 6 places")

  3. In B1, observe "Yes" or "No" (if you have not entered a 6-digit number, you will see "Not 6 places.")
User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you create a cell to type in any numbers to test for Armstrong Numbers up to 6 digits and a corresponding cell to automatically display yes or no?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write an algorithm and draw a corresponding flowchart to search a number in the given list of numbers and also display its position?

please give me an algorithm and a corresponding flow chart that displays list of numbers from 1 to 20.


Accept 5 numbers in an array and display it?

Accept 5 numbers in an array and display it.


What might have caused Windows to change your display settings?

If you launch a programme not compatible with your display settings, they may automatically changed


Draw a flow chart to accept a number from 1 to 7 and display the corresponding day of the week?

no


How do you add a zero automatically to east coast zip codes in excel?

You don't add the zero automatically, but you can display a leading zero by beginning the input with an apostrophe (') to indicate that you want to display text, instead of a number.


What is the purpose for Typeface in Excel?

You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.You need some typeface to display text and numbers. You can choose different ones for different headings or numbers, whatever you choose.


When does cell display number signs in Excel?

When the cell is not wide enough to display the numbers that are in it. Widening the column will enable you to see the numbers properly.


Which set option is used with vi editor to display line numbers on screen?

FromCommand Mode :set nu Display line numbers


Draw a flowchart to accept five numbers and display the sum of the numbers?

start, inputbox,inputbox,inputbox,inputbox,inputbox,progresh,display,stop 


Excel displays numbers as percentages?

Yes. Excel can display numbers as percentages. Do you have a question?


7 segment display LED?

A seven segment display is a device used to display numbers and letters on things such as alarm clocks. A 7 segment display is simply seven LED's packaged in a pattern that allows numbers and letters to be displayed by illuminating different sets of LED's.


Display the sum of all numbers from 1 to 100?

5,050