Select Page
Poker Forum
Over 1,292,000 Posts!
Poker ForumFTR Community

Project Euler

Results 1 to 14 of 14

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    MadMojoMonkey's Avatar
    Join Date
    Apr 2012
    Posts
    10,456
    Location
    St Louis, MO
    If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

    Find the sum of all the multiples of 3 or 5 below 1000.
    In Excell, not even using a script:

    1) Fill column A with the numbers 1 to 999, with one number in each cell.
    * type 1 in cell A1, press enter.
    * type 2 in cell A2, press enter.
    * Click and drag to select those 2 cells, drag-expand the selection from the lower-right corner to fill the column A with numbers up to 999.

    2) isolate the numbers which are multiples of 3 or 5.
    * In cell B1, type the following:
    =IF(MOD(A1,3)=0,A1,IF(MOD(A1,5)=0,A1,0))
    * press enter.
    * select cell B1 and double-click on the lower-right corner of the cell. (this should fill the cells in column B exactly where you want it to and no more)

    3) Find the sum of the isolated numbers.
    * In any cell that is not already used, and not in column B, type the following:
    =SUM(B:B)

    The answer is 233,168
    Last edited by MadMojoMonkey; 01-16-2014 at 06:54 PM.

Posting Permissions

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