+ Reply to Thread
Results 1 to 13 of 13

Algorithm Challenge

Hybrid View

Guest Algorithm Challenge 09-06-2005, 04:05 AM
Guest Re: Algorithm Challenge 09-05-2005, 10:05 PM
Guest Re: Algorithm Challenge 09-06-2005, 04:05 AM
Guest Re: Algorithm Challenge 09-06-2005, 04:05 AM
Guest Re: Algorithm Challenge 09-06-2005, 04:05 AM
Guest Re: Algorithm Challenge 09-06-2005, 04:05 AM
Guest Re: Algorithm Challenge 09-05-2005, 10:05 PM
Guest Re: Algorithm Challenge 09-05-2005, 11:05 PM
Guest Re: Algorithm Challenge 09-05-2005, 10:05 PM
Guest Re: Algorithm Challenge 09-05-2005, 11:05 PM
Guest Re: Algorithm Challenge 09-05-2005, 10:05 PM
Guest Re: Algorithm Challenge 09-05-2005, 11:05 PM
Guest Re: Algorithm Challenge 09-05-2005, 11:05 PM
  1. #1
    Bob Phillips
    Guest

    Re: Algorithm Challenge


    "Bernard Liengme" <bliengme@stfx.TRUENORTH.ca> wrote in message
    news:e9r2ndSjFHA.1948@TK2MSFTNGP12.phx.gbl...

    > The value must be entered as '0500450002883 to preserve the leading zero


    You could always force it

    =MOD(SUMPRODUCT(--(MID(TEXT(A1,"0000000000000"),ROW(INDIRECT("1:12")),1)),RO
    W(INDIRECT("1:12"))),9)




  2. #2
    Harlan Grove
    Guest

    Re: Algorithm Challenge

    Bob Phillips wrote...
    ....
    >You could always force it
    >
    >=MOD(SUMPRODUCT(--(MID(TEXT(A1,"0000000000000"),ROW(INDIRECT("1:12")),1)),
    >ROW(INDIRECT("1:12"))),9)


    Why not just treat it as a number in the first place?

    =MOD(SUMPRODUCT(INT(A1/10^{1;2;3;4;5;6;7;8;9;10;11;12})
    -10*INT(A1/10^{2;3;4;5;6;7;8;9;10;11;12;13}),
    {12;11;10;9;8;7;6;5;4;3;2;1}),9)

    This is lots longer, but if you name the array something like ARRAY, it
    becomes

    =MOD(SUMPRODUCT(INT(A1/10^ARRAY)-10*INT(A1/10^(1+ARRAY)),13-ARRAY),9)


  3. #3
    Harlan Grove
    Guest

    Re: Algorithm Challenge

    Bob Phillips wrote...
    ....
    >You could always force it
    >
    >=MOD(SUMPRODUCT(--(MID(TEXT(A1,"0000000000000"),ROW(INDIRECT("1:12")),1)),
    >ROW(INDIRECT("1:12"))),9)


    Why not just treat it as a number in the first place?

    =MOD(SUMPRODUCT(INT(A1/10^{1;2;3;4;5;6;7;8;9;10;11;12})
    -10*INT(A1/10^{2;3;4;5;6;7;8;9;10;11;12;13}),
    {12;11;10;9;8;7;6;5;4;3;2;1}),9)

    This is lots longer, but if you name the array something like ARRAY, it
    becomes

    =MOD(SUMPRODUCT(INT(A1/10^ARRAY)-10*INT(A1/10^(1+ARRAY)),13-ARRAY),9)


  4. #4
    Harlan Grove
    Guest

    Re: Algorithm Challenge

    Bob Phillips wrote...
    ....
    >You could always force it
    >
    >=MOD(SUMPRODUCT(--(MID(TEXT(A1,"0000000000000"),ROW(INDIRECT("1:12")),1)),
    >ROW(INDIRECT("1:12"))),9)


    Why not just treat it as a number in the first place?

    =MOD(SUMPRODUCT(INT(A1/10^{1;2;3;4;5;6;7;8;9;10;11;12})
    -10*INT(A1/10^{2;3;4;5;6;7;8;9;10;11;12;13}),
    {12;11;10;9;8;7;6;5;4;3;2;1}),9)

    This is lots longer, but if you name the array something like ARRAY, it
    becomes

    =MOD(SUMPRODUCT(INT(A1/10^ARRAY)-10*INT(A1/10^(1+ARRAY)),13-ARRAY),9)


+ 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