I confused two separate invariants.  The one I gave requires values greater 
than 9.  I also need to balance the parentheses.  

In order to have it work clean for all numbers (assuming that a single digit 
doesn't count as both first and last), and avoid any implementation-specific 
rounding cases,

=VALUE(LEFT(TRIM(QUOTIENT(SUM(C35:C40),10)),1))+MOD(SUM(C35:C40),10)


-----Original Message-----
From: Dennis E. Hamilton [mailto:[email protected]] 
Sent: Tuesday, November 22, 2011 18:37
To: 'Anthony Chilco'; [email protected]
Subject: [users] Re: using functions inside functions

This only works for numbers greater than 9 (assured in the problem statement) 
less than 100.

Try this puppy:

 =VALUE(LEFT(TRIM(SUM(C35:C40)),1)+MOD(SUM(C35:C40),10)

TRIM has the nice property of forcing text from a scalar and delivering text as 
the result.

Shh, pass it on.

 - Dennis

-----Original Message-----
From: Anthony Chilco [mailto:[email protected]] 
Sent: Tuesday, November 22, 2011 18:02
To: [email protected]
Subject: [users] Re: using functions inside functions

Hi Wade,
The programmer's answer is
=QUOTIENT(SUM(C35:C40);10)+MOD(SUM(C35:C40);10)
tc
Whatever happened to DIV?




        
________________________________

        From: Wade Smart <[email protected]>
        To: [email protected] 
        Sent: Tuesday, November 22, 2011 7:52:53 AM
        Subject: [users] Re: using functions inside functions
        
        On Tue, Nov 22, 2011 at 02:02, Brian Barker <[email protected]> 
wrote:
        > =SUM(C35:C40)-9*INT(SUM(C35:C40)/10)
        
        Brian, the values of C35 - 40 are (right now)
        4,1,5,9,5,3 = 27
        2 + 7 = 9
        
        But when I used your function it produces 0
        
        Wade
        
        Jacek, Im on Ubuntu and use , not ;. Thanks.
        -- 
        --
        Registered Linux User: #480675
        Registered Linux Machine: #408606
        Linux since June 2005
        -- 
        -----------------------------------------------------------------
        To unsubscribe send email to [email protected]
        For additional commands send email to [email protected]
        with Subject: help
        
        
        


-- 
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help

-- 
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help

Reply via email to