Decimal portion to a seperate cell???

B

BrianG

I'm working on a template form where I would like to be able to sum a
column then post the whole number portion of the sum to one cell and the
decimal portion of the sum to another cell. How could this be
accomplished?

BrianG



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
T

Tom Ogilvy

=trunc(Sum(A1:A100))
=Sum(A1:A100)-Trunc(sum(A1:A100))

You could replace TRUNC with INT - they behave a little differently with
negative numbers. TRUNC gives me what I would expect (for this problem)
with a negative number.
 
M

Max Potters

Hi Brian,

I tried the following in some cells.

cell A1: 456.79 (2 decimals)
cell A2: 321.54 (2 decimals)

then in cell B1, i putted the following formula, which returns the first 3
characters beginning from the right): =RIGHT(A1,3)
B2: =RIGHT(A2,3)
B4, i putted the total: = B1+B2

I tried to use the sum() statement, but (strangely) this doesnt work

Hope this helps

Regards
Max Potters
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Vlookup and Sum 2
Vlookup finance help please 14
SaveAs Method and sheet protection 1
Passing values to new app 3
Summing N/A's 5
COMBINATORIAL SUM !! 8
Data Form 1
Subroutines vs. modules 0

Top