+ All Categories
Home > Documents > Excel Basic Formulae

Excel Basic Formulae

Date post: 04-Apr-2018
Category:
Upload: osama-mir
View: 221 times
Download: 0 times
Share this document with a friend
17
7/30/2019 Excel Basic Formulae http://slidepdf.com/reader/full/excel-basic-formulae 1/17 Add numbers in a cell  To do this task, use the + (plus sign) arithmetic operator. For example, if you type the following formula in a cell: =5+10  The cell displays the following result: 15 Add all contiguous numbers in a row or column  To do this task, use AutoSum . 1. Click a cell below the column of numbers or to the right of the row of numbers. 2. Click AutoSum on the Standard toolbar, and then press ENTER. TOP OF PAGE Add noncontiguous numbers  To do this task, use the SUM function. Example  The example may be easier to understand if you copy it to a blank worksheet. How to copy an example
Transcript
Page 1: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 1/17

Add numbers in a cell To do this task, use the + (plus sign) arithmetic operator.

For example, if you type the following formula in a cell:

=5+10

 The cell displays the following result:

15

Add all contiguous numbers in arow or column

 To do this task, use AutoSum .

1. Click a cell below the column of numbers or to the right of the row of numbers.

2. Click AutoSum on the Standard toolbar, and then press ENTER.

TOP OF PAGE

Add noncontiguous numbers To do this task, use the SUM function.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

Page 2: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 2/17

 

1

2

3

4

5

6

7

A B

Salesperson Invoice

Buchanan 15,000

Buchanan 9,000

Suyama 8,000

Suyama 20,000

Buchanan 5,000

Dodsworth 22,500

Formula Description (Result)

=SUM(B2:B3, B5)Adds two invoices from Buchanan, and one from Suyama (44,000)

=SUM(B2,B5,B7) Adds individual invoices from Buchanan, Suyama, and Dodsworth(57,500)

NOTE The SUM function can include up to 30 cell or range references.

Function details

SUM 

TOP OF PAGE

Add numbers based on onecondition

 You can use the SUMIF function to create a total value for one range based on a value inanother range, as in the following example.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

Page 3: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 3/17

 

1

2

3

4

5

6

7

A B

Salesperson Invoice

Buchanan 15,000

Buchanan 9,000

Suyama 8,000

Suyama 20,000

Buchanan 5,000

Dodsworth 22,500

Formula Description (Result)

=SUMIF(A2:A7,"Buchanan",B2:B7)Sum of invoices for Buchanan (29000)

=SUMIF(B2:B7,">=9000",B2:B7) Sum of large invoices greater than or equal to 9,000(66500)

=SUMIF(B2:B7,"<9000",B2:B7) Sum of small invoices less than 9,000 (13000)

 The SUMIF function uses the following arguments

Add numbers based on multipleconditions

 To do this task, use the IF and SUM functions.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

Page 4: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 4/17

 

1

2

3

4

5

6

7

8

9

10

11

A B C D

Region Salesperson Type Sales

South Buchanan Beverages

3571

West Davolio Dairy 3338

East Suyama Beverages

5122

North Suyama Dairy 6239

South Dodsworth Produce 8677

South Davolio Meat 450

South Davolio Meat 7673

East Suyama Produce 664

North Davolio Produce 1500

South Dodsworth Meat 6596

Formula Description (Result)

=SUM(IF((A2:A11="South")*(C2:C11="Meat"),D2:D11))Sum of Meat sales in theSouth region (14719)

=SUM(IF((A2:A11="South")+(A2:A11="East"),D2:D11)) Sum of sales where theregion is South or East(32753)

NOTE The formulas in the example must be entered as array formulas. After copying theexample to a blank worksheet, select the formula cell. Press F2, and then press CTRL+SHIFT+ENTER. If theformula is not entered as an array formula, the error #VALUE! is returned.

Add numbers based on criteriastored in a separate range

Page 5: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 5/17

 To do this task, use the DSUM function.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 

1

2

3

4

5

6

7

8

9

10

11

A B C D

Region Salesperson Type Sales

South Buchanan Beverages

3571

West Davolio Dairy 3338

East Suyama Beverages

5122

North Suyama Dairy 6239

South Dodsworth Produce 8677

South Davolio Meat 450

South Davolio Meat 7673

East Suyama Produce 664

North Davolio Produce 1500

South Dodsworth Meat 6596

Region Salesperson Type Sales

South Meat

Produce

Formula Description (Result)

Page 6: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 6/17

=DSUM(A1:D11, "Sales", A12:D13)

Sum of Meat sales in the South region (14719)

=DSUM(A1:D11, "Sales", A12:D14)

Sum of Meat and Produce sales in the Southregion (25560)

 The DSUM function uses the following arguments.

 

Calculate the smallest or largest number in a range

If the cells are in a contiguous row or column

1. Select a cell below or to the right of the numbers for which you want to find thesmallest number.

2. Click the arrow next to AutoSum , and then click Min (calculates the smallest), orMax (calculates the largest), and then press ENTER.

If the cells are not in a contiguous row orcolumn 

Count cells that contain numbers

Count cells that contain numbers in acontiguous row or column

1. Select a cell below or to the right of the numbers that you want to count.

2. Click the arrow next to the AutoSum on the Standard toolbar, and then clickCount and press ENTER.

TOP OF PAGE

Count cells that contain numbers that are notin a contiguous row or column

 To do this task, use the COUNT function.

Example

Page 7: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 7/17

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 

1

2

3

4

5

6

A

Data

Sales

12/8/2007

19

22.44

Formula Description (Result)

=COUNT(A2:A6) Counts number of cells that contain numbers (3) in the list. A date is a number.

=COUNT(A2:A3,A6)Counts number of cells that contain numbers (2), of the top two and bottom cellsin the list. A date is a number.

 

Count nonblank cells

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 

1

2

3

4

5

A

Data

Sales

19

Page 8: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 8/17

6

TRUE

Formula Description (Result)

=COUNTA(A2:A6) Counts the number of nonblank cells in the list above (3)

=COUNTA(A2:A3, A6)

Counts the number of nonblank cells in the top two, and bottom cell in the list(1)

Count how often a value occurs

Count how often a single value occurs byusing a function

Use the COUNTIF function to perform this task.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 

1

2

3

4

5

6

7

A B

Salesperson Invoice

Buchanan 15,000

Buchanan 9,000

Suyama 8,000

Suyama 20,000

Buchanan 5,000

Dodsworth 22,500

Formula Description (Result)

=COUNTIF(A2:A7,"Buchanan")Number of entries for Buchanan (3)

Page 9: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 9/17

=COUNTIF(A2:A7,A4) Number of entries for Suyama (2)

=COUNTIF(B2:B7,"< 20000") Number of invoice values less than 20,000 (4)

=COUNTIF(B2:B7,">="&B5) Number of invoice values greater than or equal to 20,000(2)

 

Count numbers greater than or less than a number

 To count numbers greater than or less than a number, use the COUNTIF function. To countnumbers that fall between a range of numbers, you can use the SUMPRODUCT function.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 To switch between viewing the results and viewing the formulas that return the results,press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group,click the Show Formulas button.

 

1

2

3

4

5

6

7

A B

Salesperson Invoice

Buchanan 15,000

Buchanan 9,000

Suyama 8,000

Suyama 20,000

Buchanan 5,000

Dodsworth 22,500

Formula Description (Result)

=COUNTIF(B2:B7,">9000") Numbers above 9000 (3)

Page 10: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 10/17

=COUNTIF(B2:B7,"<=9000") Numbers less than or equal to 9000 (3)

=SUMPRODUCT((B2:B7>=9000)*(B2:B7<=22500))The SUMPRODUCT function counts the number 

of cells in the range B2:B7 that contain numbersgreater than or equal to 9000 and less than or equal to 22500 (4).

Convert measurements

 

Show All

Let's say you want to know how many kilometers that you ran on a quarter-mile track or atolerance level using metric values. To convert measurements, use the CONVERT function.

 The CONVERT function converts a wide range of measurements, including measures of 

weight, distance, time, pressure, force, energy, power, magnetism, temperature, and liquidmeasure.

If the CONVERT function is not available, install and load the Analysis ToolPak add-in.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 

1

2

A

Data

6

Formula Description (Result)

=CONVERT(A2,"C","F") Convert 6 degrees Celsius to Fahrenheit(42.8)

=CONVERT(A2,"tsp","tbs")Convert 6 teaspoons to tablespoons (2)

=CONVERT(A2,"gal","l") Convert 6 gallons to liters (22.71741274)

=CONVERT(A2,"mi","km") Convert 6 miles to kilometers (9.656064)

=CONVERT(A2,"km","mi") Convert 6 kilometers to miles (3.728227153)

Page 11: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 11/17

=CONVERT(A2,"in","ft") Convert 6 inches to feet (0.5)

=CONVERT(A2,"cm","in") Convert 6 centimeters to inches

(2.362204724)

Convert between time units

 To do this task, use the CONVERT function.

If the CONVERT function is not available, install and load the Analysis ToolPak add-in.

How?

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 

1

2

A

Data

6

Formula Description (Result)

=CONVERT(A2,"day","hr") Convert 6 days to hours (144)

=CONVERT(A2,"hr","mn") Convert 6 hours to minutes(360)

=CONVERT(A2,"yr", "day")Convert 6 years to days(2191.5)

NOTE For conversions using a year, a year is treated as 365.25 days.

Compare one cell to another cell To do this task, use the EXACT function.

Example

Page 12: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 12/17

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 

1

2

3

4

A

Data

BD122

BD123

BD123

Formula Description (Result)

=EXACT(A2,A3)Compare contents of A2 and A3(FALSE)

=EXACT(A3,A4)Compare contents of A3 and A4 (TRUE)

NOTE EXACT is case-sensitive but ignores formatting differences.

Compare one value to a list of 

values To do this task, use the EXACT and OR functions.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 

1

2

3

A B

List Cell

 Apple Grape

Orange

Page 13: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 13/17

4 Banana

Formula Description (Result)

=OR(EXACT(B2, A2:A4))Compares "Grape" to each value in the list

(FALSE)

NOTE The formula in the example must be entered as an array formula. After copying theexample to a blank worksheet, select each formula cell individually. Press F2, and then pressCTRL+SHIFT+ENTER. If the formula is not entered as an array formula, the error #VALUE! isreturned.

Combine two or more columns by using a function

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

NOTE To see the result without breaking the lines of the name or address, expand thewidth of column A to at least 17.00 units or 124 pixels.

 

1

2

A B C D E F

First name Last name Street

address

City Stat

e

Zip

code

Robert Walters 4567Main St.

Buffalo

NY 98052

Function Description

=CONCATENATE("The ", B2, "Family", CHAR(10), C2, CHAR(10),

D2, ", ", E2, " ", F2)

Combines the last name with thewords "The" and "Family" and then

combines the address with it.CHAR(10) is used to insert a newline.Result:The Walters Family4567 Main St.Buffalo, NY 98052

Page 14: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 14/17

Calculate the average of numbers not in acontiguous row or column

 To do this task, use the AVERAGE function.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 

1

2

3

4

5

6

7

A

Data

10

7

9

27

0

4

Formula Description (Result)

=AVERAGE(A2:A7) Averages all of numbers in list above (9.5)

=AVERAGE(A2:A4,A7) Averages the top three and the last number in the list (7.5)

=AVERAGE(IF(A2:A7<>0, A2:A7,""))

 Averages the numbers in the list except those that contain zero,such as cell A6 (11.4)

NOTE The last formula in the example must be entered as an array formula. After copyingthe example to a blank worksheet, select the cell A11. Press F2, and then pressCTRL+SHIFT+ENTER. If the formula is not entered as an array formula, the error #VALUE! isreturned.

Calculate a weighted average

Page 15: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 15/17

 To do this task, use the SUMPRODUCT and SUM functions.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

 This example calculates the average price paid for a unit across three purchases, whereeach purchase is for a different number of units at a different price per unit.

 

1

2

3

4

A B

Price per unit Number of units

20 500

25 750

35 200

Formula Description (Result)

=SUMPRODUCT(A2:A4,B2:B4)/SUM(B2:B4)Divides the total cost of all three orders by the totalnumber of units ordered (24.66)

Calculate the average of numbers, ignoringzero (0) values

 To do this task, use the AVERAGE and IF functions.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

Page 16: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 16/17

 

1

2

3

4

5

6

7

A

Data

10

7

9

27

0

4

Formula Description (Result)

=AVERAGE(IF(A2:A7<>0, A2:A7,""))

 Averages the numbers in the list except those that contain zero,such as cell A6 (11.4)

Create conditional formulas

 Testing whether conditions are true or false and making logical comparisons betweenexpressions are common to many tasks. You can use the AND, OR, NOT, and IF function tocreate conditional formulas.

 The IF function uses the following arguments.

Formula with the IF function

logical_test: The condition that you want to check.

value_if_true: The value to return if the condition is true.

value_if_false: The value to return if the condition is false.

Create a conditional formula that results in a logical value(TRUE or FALSE)

 To do this task, use the AND, OR, and NOT functions, and operators.

Example

 The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

Page 17: Excel Basic Formulae

7/30/2019 Excel Basic Formulae

http://slidepdf.com/reader/full/excel-basic-formulae 17/17

 

1

2

3

4

A

Data

15

9

8

Sprockets

Widgets

Formula Description (Result)

=AND(A2>A3, A2<A4) Is 15 greater than 9 and less than 8? (FALSE)

=OR(A2>A3, A2<A4) Is 15 greater than 9 or less than 8? (TRUE)

=NOT(A2+A3=24) Is 15 plus 9 not equal to 24? (FALSE)

=NOT(A5="Sprockets") Is A5 not equal to "Sprockets"? (FALSE)

=OR(A5<>"Sprockets",A6 =

"Widgets")

Is A5 not equal to "Sprockets" or A6 equal to "Widgets"?

(TRUE)


Recommended