excel addseparatedcells

8
Credits: SUMPRODUCT() Multiplies corresponding components in the given arrays, and returns the sum of those products. Syntax Remarks The array arguments must have the same dimensions. If they do not, SUMPRODUCT returns the SUMPRODUCT treats array entries that are not numeric as if they were zeros. MOD() Returns the remainder after number is divided by divisor. The result has the same sign as divisor. Syntax ROW() Returns the row number of a reference. Syntax If reference is omitted, it is assumed to be the reference of the cell in which the ROW function ap Reference cannot refer to multiple areas. COLUMN() Returns the column number of the given reference. Syntax If reference is omitted, it is assumed to be the reference of the cell in which the COLUMN functio Reference cannot refer to multiple areas How It Works: The secret of this is to 'trick' the SUMPRODUCT() function into doing simple addition instead of actual multiplication. By using the MOD() function we restrict the multiplication to values of either 0 or 1. By testing the results of a MOD() operation for a result of zero, we turn it into a boolean (logical) function that will return 0 if the result was not zero, and 1 (true) if the result was zero. The result of a MOD() operation is only zero when the number is an even multiple of the divisor. For the ROW() function the return value is fairly obvious: it's the row number of a cell. For the COLUMN() function, returns are from 1 to 256, where column A=1, B=2, etc. rows/columns you need to add together are even or odd numbered rows/columns. Hence the variations of the for TRICK to refer to all rows or columns in a range and thus never have to worry about changing it/them as you add Thanks to BBR Member PapaDOS for revealing these nice functions. Especially for the "every other" SUMPRODUCT(array1,array2,array3, ...) Array1, array2, array3, ... are 2 to 30 arrays whose components you want to multiply and the MOD(number,divisor) Number is the number for which you want to find the remainder. Divisor is the number by which you want to divide number ROW(reference) Reference is the cell or range of cells for which you want the row number. COLUMN(reference) Reference is the cell or range of cells for which you want the column number. The "Every Other Row/Column" functions are slightly different - you have to determine whether the Because SUMPRODUCTS() ignores non-numeric entries in the array1 range, you can set the formulas up

Upload: johanduraan9540

Post on 09-Jul-2016

212 views

Category:

Documents


0 download

DESCRIPTION

Excel AddSeparatedCells

TRANSCRIPT

Page 1: Excel AddSeparatedCells

Credits:

SUMPRODUCT()Multiplies corresponding components in the given arrays, and returns the sum of those products.Syntax

RemarksThe array arguments must have the same dimensions. If they do not, SUMPRODUCT returns the #VALUE! error value.SUMPRODUCT treats array entries that are not numeric as if they were zeros.

MOD()Returns the remainder after number is divided by divisor. The result has the same sign as divisor.Syntax

ROW()Returns the row number of a reference.Syntax

If reference is omitted, it is assumed to be the reference of the cell in which the ROW function appears.Reference cannot refer to multiple areas.

COLUMN()Returns the column number of the given reference.Syntax

If reference is omitted, it is assumed to be the reference of the cell in which the COLUMN function appears.Reference cannot refer to multiple areas

How It Works:The secret of this is to 'trick' the SUMPRODUCT() function into doing simple addition instead ofactual multiplication. By using the MOD() function we restrict the multiplication to values ofeither 0 or 1. By testing the results of a MOD() operation for a result of zero, we turn it into a boolean (logical)function that will return 0 if the result was not zero, and 1 (true) if the result was zero.The result of a MOD() operation is only zero when the number is an even multiple of the divisor.

For the ROW() function the return value is fairly obvious: it's the row number of a cell.For the COLUMN() function, returns are from 1 to 256, where column A=1, B=2, etc.

rows/columns you need to add together are even or odd numbered rows/columns. Hence the variations of the formulas.

TRICK

to refer to all rows or columns in a range and thus never have to worry about changing it/them as you add

Thanks to BBR Member PapaDOS for revealing these nice functions. Especially for the "every other" functions.

SUMPRODUCT(array1,array2,array3, ...)Array1, array2, array3, ...    are 2 to 30 arrays whose components you want to multiply and then add.

MOD(number,divisor)Number    is the number for which you want to find the remainder.Divisor    is the number by which you want to divide number

ROW(reference)Reference    is the cell or range of cells for which you want the row number.

COLUMN(reference)Reference    is the cell or range of cells for which you want the column number.

The "Every Other Row/Column" functions are slightly different - you have to determine whether the

Because SUMPRODUCTS() ignores non-numeric entries in the array1 range, you can set the formulas up

Page 2: Excel AddSeparatedCells

data to the values to be added together.For adding rows the formulas can be changed to something like A1:A65536 (assuming data in column A)For adding columns the formulas can be changed to something like A1:IV1 (assuming data is in row 1)

Page 3: Excel AddSeparatedCells

The array arguments must have the same dimensions. If they do not, SUMPRODUCT returns the #VALUE! error value.

If reference is omitted, it is assumed to be the reference of the cell in which the ROW function appears.

If reference is omitted, it is assumed to be the reference of the cell in which the COLUMN function appears.

rows/columns you need to add together are even or odd numbered rows/columns. Hence the variations of the formulas.

for revealing these nice functions. Especially for the "every other" functions.

    are 2 to 30 arrays whose components you want to multiply and then add.

Page 4: Excel AddSeparatedCells
Page 5: Excel AddSeparatedCells

Item 1 1Item 2 2Item 3 3Item 4 4Item 5 5Item 1 0Item 2 2Item 3 3Item 4 4Item 5 5Item 1 0Item 2 2Item 3 3Item 4 4Item 5 5Item 1 0Item 2 2Item 3 3Item 4 4Item 5 5Item 1 0Item 2 2Item 3 3Item 4 4Item 5 5Item 1 0Item 2 2Item 3 3Item 4 4Item 5 5

Total for Every 5 th entry.30 < working with values in column B

Check Values:42 Every 2nd row28 Every 3rd Row21 Every 4th row30 Every 5th row85 Every (all) rows

42 Even Rows 4243 Odd Rows 43

Page 6: Excel AddSeparatedCells

Val 1 0.1 Val 2 0.2 Val 3 0.3 Val 4 0.4 Val 5

1 Val 1 0.1 Val 2 0.2 Val 3 0.3 Val 4 0.4

Val 1 Val 2 Val 3 Val 4 Val 5 Val 1 Val 2 Val 3 Val 40.75 0.6 0.7 0.8 0.9 0.5 0.6 0.7 0.8

Add Even Columns5.5 working on row 1 entries

Add Odd Columns5.5 working on row 3 entries

Enter nth value > 41.5 Add nth columns (works on data in row 6)

Check values3.5 Even (2nd columns)

3.75 Odd Columns2 Every 3rd Column

1.5 Every 4th column1.8 Every 5th column

7.25 Every 1nth (all) rows

Page 7: Excel AddSeparatedCells

0.5 Val 6 0.6 Val 7 0.7 Val 8 0.8 Val 9 0.9 Val 10

Val 5 0.5 Val 6 0.6 Val 7 0.7 Val 8 0.8 Val 9 0.9

Val 50.9

Page 8: Excel AddSeparatedCells

1

Val 10