A
A
AntHTML2018-01-15 12:27:47
excel
AntHTML, 2018-01-15 12:27:47

How to divide the integer and fractional parts of numbers and display each sum in different cells?

It is necessary to sum the numbers in a range of cells (30-40 cells), but so that the integer parts of the numbers are summed separately, and the fractional parts separately.
For example, the results of the sum 8.1+7.3+4.2 were the numbers 19 and 6 (in different cells).
Is it possible to do this by grouping the SUM(), SUMIF(), SELECT(), MOD() formulas, or is this operation possible only with the involvement of VBA macros?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Kiselyov, 2018-01-15
@anthtml

Option 1. Split this column into columns, the separator symbol is a comma or a dot (depending on the source). Next, summarize each new column separately.
UPD
Option 2. Through array formulas.

For the sum of integers: =SUM(INTEGER(A1:A4))
For the sum of the fractional part: =SUM(A1:A4-INTEGER(A1:A4))
A1:A4 is the range you need.
If you have not dealt with array formulas, then note that the formula will be in curly braces: { }, otherwise you will get an error.
It is useless to enter { } only from the keyboard, EXCEL will perceive them as text.
To enter an array formula, enter the formula as usual and then press CTRL+SHIFT+ENTER. The formula becomes an array formula and appears in curly braces on the screen. After editing the array formula, press CTRL+SHIFT+ENTER again.

S
Sergey, 2020-04-24
@Taran_tool

I got out of this situation as follows:
If the data is written in the range A1:A3, then
=INTEG(SUM(A1:A3))
=RIGHT(TEXT(SUM(A1:A3),"0.00");2)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question