Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Decimal portion to a seperate cell???

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Decimal portion to a seperate cell???

Try

=Int(A1)
= A1-Int(A1)


---
Regards,
Norman



"BrianG" wrote in message
...
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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Decimal portion to a seperate cell???

=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.

--
Regards,
Tom Ogilvy

"BrianG" wrote in message
...
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!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Decimal portion to a seperate cell???

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


"BrianG" wrote in message
...
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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
add two cells from seperate work sheets into a cell on seperate wo lar Excel Worksheet Functions 6 April 27th 10 06:54 PM
vLookup a portion of a no. in a cell kattay Excel Worksheet Functions 3 September 23rd 09 04:18 AM
Extract portion of a cell Secret Squirrel Excel Discussion (Misc queries) 4 October 26th 08 05:24 AM
excel formula referring to a decimal portion of another cell teenerx5 Excel Worksheet Functions 1 February 24th 07 05:58 PM
how do i operate on the decimal portion of a number maintchief New Users to Excel 3 October 24th 05 06:43 PM


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"