The easiest way to sum a cell range is to simply select the cell range and read the values in the status bar. It shows the total, the count of non-empty cells and the average.

In fact, you can customize the status bar to show even more data:

Here is how to show these calculations automatically in the status bar.

- Right click on the status bar with your mouse.
- Click "Numerical Count", "Minimum", and "Maximum", see image below.

The image below demonstrates these calculations enabled.

This is probably the most common task in Excel and luckily, there is an easy short cut to use.

- Select the cell range you want to sum.
- Press and hold Alt on your keyboard.
- Then press =

This will create a formula containing the SUM function and a cell reference to the selected cells, see image above.

You can also go to tab "Home" on the ribbon and click "AutoSum" button and get the same result. To create totals below all columns select cell range C13:N13 and press and hold Alt and then press =

The picture above shows a formula in cell C15 that sums a column in cell range C3:N12 based on the specified column header in cell C14.

Formula in cell C15:

=SUM(INDEX(C3:N12, 0, MATCH(C14, C2:N2, 0)))

The MATCH function returns a number representing the position of the given value in cell C14, in C2:N2.

MATCH(C14, C2:N2, 0)

becomes

MATCH("May", {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, 0)

and returns 5.

The INDEX function returns the entire column in cell C3:N12 if the row argument is 0 (zero).

INDEX(C3:N12, 0, MATCH(C14, C2:N2, 0))

becomes

INDEX(C3:N12, 0, 5)

and returns {61; 68; 13; 19; 69; 96; 5; 7; 14; 50}.

The SUM function adds the numbers given and returns a total.

SUM(INDEX(C3:N12, 0, MATCH(C14, C2:N2, 0)))

becomes

SUM({61; 68; 13; 19; 69; 96; 5; 7; 14; 50})

and returns 402.

Formula in cell C15:

=SUM(INDEX($C$3:$N$12,MATCH(C14,B3:B12,0),0))

This formula is very similar to the prior one, no explanation is needed.

This image displays the dataset converted to an Excel defined Table. When you click and drag to create cell references they are instantly changed to structured references, this means that you generally don't have to adjust the cell references when you add data to the Excel defined Table.

Formula in cell C15:

=SUM(INDEX(Table1,0,MATCH(C14,Table1[#Headers],0)))

The image above shows you a formula in cell D3 that tries to get the smallest number from cell range B3:B12 but it returns an error. This happens if the cell range contains at least one error value.

Formula in cell D3:

=SMALL(B3:B12,1)

The SMALL function ignores text and boolean values but not error values, however, the AGGREGATE function lets you choose between a variety of functions (including SMALL function).

You also have the option to ignore error values, the second argument lets you specify this.

=AGGREGATE(15,6,B3:B12,1)

The AGGREGATE function contains these functions AVERAGE, COUNT, COUNTA, MAX, MIN, PRODUCT, STDEV.S, STDEV.P, SUM, VAR.S, VAR.P, MEDIAN, MODE.SNGL, LARGE, SMALL, PERCENTILE.INC, QUARTILE.INC, PERCENTILE.EXC and QUARTILE.EXC.

You can see a list of available functions while entering the arguments in the function, see image below.

The second argument has the following settings, I chose 6 - Ignore error values.

The AGGREGATE function was introduced in Excel 2010, if you have an earlier Excel version then I recommend using the following array formula:

=SMALL(IFERROR(B3:B12,""),1)

To enter an array formula, type the formula in a cell then press and hold CTRL + SHIFT simultaneously, now press Enter once. Release all keys.

The formula bar now shows the formula with a beginning and ending curly bracket telling you that you entered the formula successfully. Don't enter the curly brackets yourself.

The VDB function calculates the depreciation of an asset for a given period using the double-declining balance method or based on user input, you may use partial periods in this function. VDB is an abbreviation for variable declining balance.

Formula in cell D12:

=VDB(C3,C4,C5,B12,C12)

VDB(*cost, salvage, life, start_period, end_period, [factor], [no_switch]*)

Cost |
Required. What you pay for the asset. |

Salvage |
Required. The value of the asset at the end of depreciation. |

Life |
Required. The number of periods the asset is being depreciated. |

Start_period |
Required. The start of the range you want to calculate the depreciation. Start_period must use the same units as life. |

End_period |
Required. The end of the range you want to calculate the depreciation. End_period must use the same units as life. |

[factor] |
Optional. How quickly the balance declines, default value is 2 (the double-declining balance method). |

[no-switch] |
Optional. A boolean value determining whether to use to straight-line depreciation when depreciation is larger than the declining balance calculation.
TRUE - Does not switch to a straight-line depreciation even if the depreciation is larger than the declining balance calculation. FALSE - Switches to straight-line depreciation if the depreciation is larger than the declining balance calculation. |

All arguments must be positive numerical values except *no_switch*.

The DDB function calculates the depreciation of an asset for a given period using the double-declining balance method or based on user input.

Formula in cell F3:

=DDB($C$3,$C$4,$C$5,E3)

DDB(*cost, salvage, life, period*, [*factor*])

Cost |
Required. What you pay for the asset. |

Salvage |
Required. The value of the asset at the end of depreciation. |

Life |
Required. The number of periods the asset is being depreciated. |

Period |
Required. The period you want to know the depreciation of. |

[factor] |
Optional. How quickly the balance declines, default value is 2 (the double-declining balance method). |

Here is how the DDB function calculates the depreciation of a period:

Min( (cost - total depreciation from prior periods) * (factor/life), (cost - salvage - total depreciation from prior periods) )

]]>The image above demonstrates a Conditional Formatting formula that highlights unique distinct records. This means that the first instance of each record is highlighted, however, every duplicate is not highlighted.

Example, Row 13 shown in the image above has a duplicate in row 5. Row 5 is the first instance of that particular record and is highlighted but row 13 is a duplicate and is not highlighted.

I have also written an article about how to extract unique distinct records and counting unique distinct records.

Conditional formatting formula:

=COUNTIFS($B$3:$B3, $B3, $C$3:$C3, $C3, $D$3:$D3, $D3, $E$3:$E3, $E3)=1

The COUNTIFS function calculates the number of cells across multiple ranges that equals all given conditions, it has at least one pair of a *criteria1* argument and *criteria_range1* argument.

COUNTIFS(*criteria_range1*, *criteria1*, [*criteria_range2*, *criteria2*]…)

In this example we have four columns so 4 pairs are needed to calculate if a record is unique distinct or not.

The first argument in the COUNTIFS function is the *criteria_range1 *and I am using this cell reference: $B$3:$B3

The first part is locked to column B and row 3. $B$3 The second part is only locked to column B, the row number changes as the conditional formatting moves on to the next cell below.

This makes the cell reference grow as the conditional formatting moves to cells below.

The same basic technique is used with the other cell references in the COUNTIFS function.

COUNTIFS($B$3:$B3, $B3, $C$3:$C3, $C3, $D$3:$D3, $D3, $E$3:$E3, $E3)

becomes

COUNTIFS("Sample0", "Sample0", "B", "B", 11, 11, "AA111", "AA111")

and returns 1.

COUNTIFS($B$3:$B3, $B3, $C$3:$C3, $C3, $D$3:$D3, $D3, $E$3:$E3, $E3)=1

becomes

1=1

and returns TRUE. Cell B3 is highlighted.

Note: Conditional formatting is volatile meaning when the worksheet is recalculated all conditionally formatted cells are recalculated, this may slow down your worksheet considerably.

The AMORLINC function calculates the depreciation for each accounting period. This function is designed for the French accounting system.

Formula in cell C6:

=AMORLINC (C2, C3, C4, C5, C6, C7, C8)

AMORLINC(*cost, date_purchased, first_period, salvage, period, rate, [basis]*)

cost |
Required. |

date_purchased |
Required. |

first_period |
Required. The date of the end of the first period. |

salvage |
Required. The salvage value. |

period |
Required. |

rate |
Required. The rate of depreciation. |

[basis] |
Required. The year count. |

Basis |
Day count |

0 (default) |
360 (NASD) |

1 |
Actual |

3 |
365 |

4 |
European 360 |

The depreciation rate will grow to 50 percent for the period before the last period and grows to 100 percent for the last period.

The prorated depreciation is taken into account if an asset is purchased in the middle of the accounting period.

Keep in mind to use the DATE function if you enter dates in the function instead of using cell references.

For example,

=AMORLINC(C2, DATE(2018,9,21), DATE(2018,12,31),C5,C6,C7,C8)

]]>The AMORDEGRC function calculates the depreciation for each accounting period. This function is designed for the French accounting system.

Formula in cell C6:

=AMORDEGRC (C2, C3, C4, C5, C6, C7, C8)

AMORDEGRC(*cost, date_purchased, first_period, salvage, period, rate, [basis]*)

cost |
Required. |

date_purchased |
Required. |

first_period |
Required. The date of the end of the first period. |

salvage |
Required. The salvage value. |

period |
Required. |

rate |
Required. The rate of depreciation. |

[basis] |
Required. The year count. |

Basis |
Day count |

0 (default) |
360 (NASD) |

1 |
Actual |

3 |
365 |

4 |
European 360 |

Life of asset |
Coefficient |

Between 3 and 4 years |
1.5 |

Between 5 and 6 years |
2 |

More than 6 years |
2.5 |

The depreciation rate will grow to 50 percent for the period before the last period and grows to 100 percent for the last period.

The prorated depreciation is taken into account if an asset is purchased in the middle of the accounting period. There is a depreciation coefficient taken into account in the calculation based on the life of the assets.

This function will calculate the depreciation for all periods except the last period of the life of the assets or if the cumulated value of depreciation is greater than the cost of the assets minus the salvage value.

Keep in mind to use the DATE function if you enter dates in the function instead of using cell references.

For example,

=AMORDEGRC(C2, DATE(2018,9,21), DATE(2018,12,31),C5,C6,C7,C8)

Date arguments are truncated to integers.

The AMORDEGRC function returns:

- #NUM! error If the life of assets is between 0 (zero) and 1, 1 and 2, 2 and 3, or 4 and 5

The YIELD function calculates the yield for a security that pays interest. The YIELD function is designed to calculate the bond yield.

Formula in cell C6:

=YIELD(C2, C3, C4, C5, C6, C7, C8)

YIELD(*settlement, maturity, rate, pr, redemption, frequency, [basis]*)

settlement |
Required. The security's settlement date which is the date after the issue date. |

maturity |
Required. The date when the security expires. |

rate |
Required. The security's annual coupon rate. |

pr |
Required. The security's price per $100 face value (par amount). |

redemption |
Required. The security's redemption value per $100 face value. |

frequency |
Required. The Treasury bill's price per $100 face value (par amount). |

[basis] |
Required. The Treasury bill's price per $100 face value (par amount). |

Basis |
Day count |

0 (default) |
US (NASD) 30/360 |

1 |
Actual/actual |

2 |
Actual/360 |

3 |
Actual/365 |

4 |
European 30/360 |

Keep in mind to use the DATE function if you enter dates in the function instead of using cell references.

For example,

=YIELD(DATE(2018, 9, 30), DATE(2018, 12, 31), C4, C5, C6, C7, C8)

Date arguments are truncated to integers.

The YIELD function returns:

- #VALUE! error if
*settlement*or*maturity*is not a valid data type. - #NUM! error if
*pr*<= 0 (zero)- redemption <= 0
- frequency <> 1, 2 or 4
- basis < 0 (zero)
- settlement >= maturity

The SYD function calculates the yearly asset depreciation of a given year.

Formula in cell C6:

=SYD(C2,C3,C4,C5)

SYD(*cost*, *salvage*, *life*, *per*)

cost |
Required. The cost of an asset. |

salvage |
Required. The final value after depreciation (salvage value). |

life |
Required. The number of periods the asset is depreciated. |

per |
Required. The period you want to know the depreciation for. |

The TBILLPRICE function calculates the equivalent bond yield for a Treasury bill.

Formula in cell C6:

=TBILLEQ(C2,C3,C4)

TBILLEQ(*settlement*, *maturity*, *discount*)

settlement |
Required. The Treasury bill's settlement date which is the date after the issue date. |

maturity |
Required. The date when the security expires. |

discount |
Required. The Treasury bill's discount rate. |

Treasury bills are issued at a discount from the face value, the interest paid is the face value - purchase price.

For example,

=TBILLEQ(DATE(2018, 9, 30), DATE(2018, 12, 31), C4)

Date arguments are truncated to integers.

The TBILLEQ function returns:

- #VALUE! error if
*settlement*or*maturity*is not a valid data type. - #NUM! error if
*discount*<=0 (zero)*settlement*>*maturity*, or if*maturity*is more than a year after the*settlement*

Calculation formula:

TBILLEQ = (365 * rate)/(360-(rate*DSM))

DSM = days between *settlement* to *maturity* ignoring *maturity* date that is more than a year after *settlement*.