Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Russian Peasant Spreadsheet

If you consider spreadsheet formulas a programming language, and I do, then you could solve the Russian Peasant Multiplication challenge with a spreadsheet. D3: =SUM(D4:D35) A4: =B1 C4: =B2 D4: =IF(ISODD(A4),C4,"") A5: =IF(OR(ISTEXT(A4),A4=1),"",INT(A4/2)) B5: =IF(OR(ISTEXT(A4),A4=1),"","x") C5: =IF(OR(ISTEXT(A4),A4=1),"",C4*2) D5: =IF(OR(ISTEXT(A4),A4=1),"",IF(ISODD(A5),C5,"")) Then filled down. Read More...

Read the complete post at http://www.dailydoseofexcel.com/archives/2009/08/13/russian-peasant-spreadsheet/


Posted Aug 13 2009, 09:00 AM by Daily Dose of Excel
Filed under:
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.