Вы находитесь на странице: 1из 19

fx

Insert Function Button

The insert function button on the formula bar opens the Insert Function dialog box. Type in
what you want to do and click Go or hit Enter and Excel will give you a list of possible
functions. In the sample dialog box to the right, I searched for a function to find data in a
table. Excel returned four possibilities. Click the function name to see the function syntax
and a brief description. If you're not sure what all that means, click the Help on this function
link to see more information and samples of the function at work.
When you click OK, Excel will open the Functions Argument dialog box for the selected
function to help you enter the function arguments correctly. As you move the insertion
point through the arguments, Excel will give a description of what is expected. You also have
the opportunity to click for more Help on this function.
Argument labels in bold text are required arguments. Once you have entered all required
arguments, click OK and the function is entered in your worksheet.

Selecting a cell that contains a function and then clicking the


Insert Function button will open the Function Arguments
dialog box for that function.

Argument descriptions

Boni Mays
Fayetteville Technical Community College

www.maysstuff.com

IF
The IF function returns one value if a condition you specify evaluates to TRUE, and another value if that condition evaluates to FALSE.
Syntax: IF(logical test, value if true, value if false)
The logical test can use any combination of values, cell references, and comparison operators that can be evaluated as true or false.

IF Function Samples
Basic If Function
5/4/2016
Employee
Hire date
Garcia, Jorge
3/1/2008
Jones, Joe
11/1/2005
Singh, Lisa
6/1/2003
Smith, John
2/1/2007

Insurance
Yes
No
No
Yes

Deduction
235.00
0.00
0.00
235.00

In this sample, the IF function is checking to


see if they have signed up for insurance. If
they have, the deduction amount is entered.

If Function with Calculation


5/4/2016
Employee
Hire date
Years Employed Vacation days
Garcia, Jorge
3/1/2008
8.17
12.00
Jones, Joe
11/1/2005
10.50
14.00
Singh, Lisa
6/1/2003
12.93
16.00
Smith, John
2/1/2007
9.25
13.00

The IF function is determining each


employees earned vacation days. If they
have worked for more than a year, they
have earned 5 vacation days plus one day
for each additional full year.

If Function - Nested
5/4/2016
Employee
Hire date
Garcia, Jorge
3/1/2008
Jones, Joe
11/1/2005
Singh, Lisa
6/1/2003
Smith, John
2/1/2007

Insurance
Self
Family
Self
No

Deduction
235.00
505.00
235.00
0.00

In this sample, there are three possibilities


for insurance deductions: Family, Self, or No
insurance.

Meeting Day
Tuesday
Thursday
Tuesday
Thursday

Teams A and C meet on Tuesday, Teams B


and D meet on Thursday. We want to list
the meeting days in column D.

If Function with logical Or


5/4/2016
Employee
Hire date
Garcia, Jorge
3/1/2008
Jones, Joe
11/1/2005
Singh, Lisa
6/1/2003
Smith, John
2/1/2007

Boni Mays
Fayetteville Technical Community College

Team
A
B
C
D

www.maysstuff.com

TRUE, and another value if that condition evaluates to FALSE.


comparison operators that can be evaluated as true or false.

Explained - Select D11 and click [fx]


Formula in cell D11: =IF(C11="Yes",235,0)
C11="Yes" - testing to see if C11 contains the word Yes
235 - the value entered if C11 contains Yes
0 - the value entered if it does not

Explained - Select D19 and click [fx]


Formula in cell D19: =IF(C19>1,INT(C19)+4,0)
C19>1 - testing to see if they have worked more than one year
INT(C19) - reduces the decimal number to integer only
INT(C19)+4 - computes earned vacation days
0 - value entered if not qualified for vacation days

Explained - Select D27 and click [fx]


Formula in D27: =IF(C27="Self",235,IF(C27="Family",505,0))
The first IF function is checking to see if C27 contains the word
Self, if so it returns 235, if not it activates the second IF function,
which tests to see if it contains Family. If it does it returns 505, if
not it enters 0.

Explained - Select D35 and click [fx]


In D35: =IF(OR(C35="A",C35="C"),"Tuesday","Thursday")
OR(C35="A",C35="C") - or is a logical function that returns true if
any of the comparisons are true. Because C35 does equal A, D35
reads Tuesday. Because C36 is neither A or C, it contains the value
if false of Thursday.

Boni Mays
Fayetteville Technical Community College

www.maysstuff.com

PMT
The PMT function calculates the payment for a loan based on constant payments and a constant interest rate.
Syntax: PMT(rate, nper, pv, fv, type)
Rate is the interest rate per period for the loan. Nper is the total number of payments. Pv is the present value or principal.
omitted. Typeindicates when payments are due. Omitted or zero if payments are made at the end of the period, 1 if at the

PMT Function Samples


Payment for Home Loan
Payment:
Loan Amount
Interest Rate
Number of years
Payments per year
Total Payments

$1,580.17
$250,000
6.50%
30
12
360

Payment for Loan w/Balloon Payment


Payment:
Loan Amount
Interest Rate
Number of years
Payments per year
Total Payments
Balloon Payment

$1,162.94
$200,000
5.50%
30
12
360
$25,000

Monthly Deposit to Reach Savings Goal


Payment:
Savings Goal
Interest Rate
Number of years
Payments per year
Total Payments

$357.80
$50,000
3.00%
10
12
120

Payment for Home Loan in Canada


Payment:
Loan Amount
Interest Rate
Number of years
Payments per year
Boni Mays
Fayetteville Technical Community College

$1,566.01
$250,000
6.50%
30
12

www.maysstuff.com

Total Payments

Boni Mays
Fayetteville Technical Community College

360

www.maysstuff.com

r a loan based on constant payments and a constant interest rate.

an. Nper is the total number of payments. Pv is the present value or principal. Fvis the future value and is assumed to be zero if
due. Omitted or zero if payments are made at the end of the period, 1 if at the beginning.

Explained - Select B10 and click [fx]


Formula in B10: =-PMT(B12/B14,B15,B11)
The negative following the equal sign is used to negate the functions normal negative value so that the payment
displays as a positive number. Because the rate argument requires the interest rate for the period, divide the annual
rate by the number of periods per year, so the rate argument is B12/B14. The nper argument is B15, the total number of
periods for the life of the loan. The pv argument is the amount of the loan. Because this loan will be paid down to zero
and payments are made at the end of the month, the last two arguments are not required.

Explained - Select B18 and click [fx]


Formula in B18: =-PMT(B20/B22,B23,B19,B24)
Rate, nper, and pv are as above, but because this loan has a lump sum payment due at the end of the loan, we have
added the fv argument to contain that value.

Explained - Select B27 and click [fx]


Formula in B27: =-PMT(B29/B31,B32,0,B28)
This time we are depositing money to reach a savings goal, so the pv is 0 and the fv is the amount we want to have in
savings at the end of the given number of years.

Explained - Select B35 and click [fx]


Formula in B35: =-PMT(((1+(B37/2))^2)^(1/12)-1,B40,B36)
Canadians have this complicated compounded semi-annually thing so we can't just divide by the number of periods but
have to use this fancier calculation for the rate argument:
((1+(B37/2))^2)^(1/12)-1
Compared to our first loan calculation, you can see that it actually saves them a bit, so is worth the extra work.
Boni Mays
Fayetteville Technical Community College

www.maysstuff.com

Boni Mays
Fayetteville Technical Community College

www.maysstuff.com

Date Functions
Dates in Excel are actually stored as values, making it easy to do calculations with dates when all you're doing is adding or subtracting number of days. For the other things you
might want to do with dates, there are a variety of functions available to help. Here are a few you might find useful.

Basic Math with Dates

Formula in Column C

Difference in number of days


5/4/2016
1/1/2008
Add days to a date
5/4/2016

90

3046

8/2/2016

is the number of days between today and 1/1/08.

=A8-B8

is the date 90 days after today.

=A11+B11

Date Functions

Function in Column C

Function Syntax

EDATE

Function in Column C
=EDATE(A15,B15)

EDATE(start date, months)

Add number of months to a date.


5/4/2016
3
8/4/2016 is the date 3 months after today's date.

EOMONTH
5/4/2016
5/4/2016
5/4/2016

Gives the end of month date for


0
5/31/2016
1
6/30/2016
3
8/31/2016

a date plus a given number of months.


is the last day in this month.
is next months end of month date.
is the end of month date for three months from now.

NETWORKDAYS
Returns the number of full workdays between two dates.
5/4/2016
5/31/2016
20
is the number of workdays between these dates
5/4/2016
WORKDAY
5/4/2016

6/30/2016

42

is the number of workdays between these dates.

Returns a date that is the given number of working days before or after a date.
5
4/27/2016 is the date 5 work days before today.

5/4/2016

45

7/6/2016

is the date 45 work days from today.

Returns the day of a date, a number between 1 and 31.


5/4/2016
4

MONTH

EOMONTH(start date, months)

=NETWORKDAYS(A23,B23)

NETWORKDAYS(start date, end date, holidays)

=NETWORKDAYS(A24,B24)

=WORKDAY(A27,-B27)
=WORKDAY(A28,B28)

Information from Dates


DAY

=EOMONTH(A18,B18)
=EOMONTH(A19,B19)
=EOMONTH(A20,B20)

Holidays is an optional range containing dates to


exclude.

WORKDAY(start date, days, holidays)


Holidays is an optional range containing dates to
exclude.

Function in Column B

Function Syntax

=DAY(A32)

DAY(valid date)

5/4/2016

Returns the month, a number between 1 and 12.


5

=MONTH(A35)

MONTH(valid date)

5/4/2016

Returns the year, a number between 1900 and 9999.


2016

=YEAR(A38)

YEAR(valid date)

=TODAY()

TODAY()

=NOW()

NOW()

YEAR

TODAY

Returns the current date.


5/4/2016

NOW

Returns the current date and time.


5/4/2016 8:27 42494.3525062
The number to the left of the decimal is the date value and
the number to the right of the decimal is the time.
Date/Time Format
General Format

Boni Mays
Fayetteville Technical Community College

www.maysstuff.com

Lookup Functions
There are a number of functions in Excel that allow you to search for information in a table of data. Here are the two most used lookup functions.

Function

Description

HLOOKUP
Lookup value
Row num

Searches for a value in the top row of a table of values, and then returns a value in the same column from a row you specify.
Feb
Jan
Feb
Mar
HLOOKUP(lookup value, table, row num, range lookup)
2
2005
2,195
2,333
1,032
Exact Match
Lookup value is the value to find in the first row.
2006
1,854
2,939
2,040
Function in B9:
Table is the data table to use for the lookup.
2,333
2007
2,847
1,325
1,203
=HLOOKUP(B6,D6:G9,B7,0)
Row num is the row index number from which to return matching data.

Returned

15 Blue
51 Red
90 Yellow

VLOOKUP
Lookup value
Column num

Function

0
Blue

25
Green

50
Red

75
Yellow

Approximate Match
Functions in Col B:
=HLOOKUP(A11,D11:G12,2)
=HLOOKUP(A12,D11:G12,2)
=HLOOKUP(A13,D11:G12,2)

Function Syntax

Range lookup is a logical value: TRUE (or 1) or omitted for an approximate


match or FALSE (or 0) for an exact match. If True the values in the first row
must appear in ascending order.

Searches for a value in the first column of a table of values, and then returns a value in the same row from a column you specify.
2006
Jan
Feb
Mar
VLOOKUP(lookup value, table, col num, range lookup)
2
2005
2,195
2,333
1,032
Exact Match
Lookup value is the value to find in the first column.
2006
1,854
2,939
2,040
Function in B20:
Table is the data table to use for the lookup.
1,854
2007
2,847
1,325
1,203
=VLOOKUP(B17,D17:G20,B18,0)
Col num is the column index number from which to return data.

Returned

Average

Grade
83
72
99
55
90

B
C
A
E
A

Boni Mays
Fayetteville Technical Community College

Score
0
60
70
80
90

Grade
E
D
C
B
A

Approximate Match
Functions in Col B:
=VLOOKUP(A22,$D$22:$E$26,2)
=VLOOKUP(A23,$D$22:$E$26,2)
=VLOOKUP(A24,$D$22:$E$26,2)
=VLOOKUP(A25,$D$22:$E$26,2)
=VLOOKUP(A26,$D$22:$E$26,2)

Range lookup is a logical value: TRUE (or 1) or omitted for an approximate


match or FALSE (or 0) for an exact match. If True the values in the first column
must appear in ascending order.

www.maysstuff.com

VLOOKUP

The lookup table can be on a different worksheet or even a separate workbook. This example is returning information from the Lookup Table
practical use for lookup functions.
Syntax: VLOOKUP(lookup value, table, col num, range lookup)

Customer ID
Customer Name

Address 1
City
State
Zip

3333
Ella Arteaga

To see the Customer Name and Address information change, enter a Cu


1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 1234
Function in Cell B9: =VLOOKUP(B8,'Lookup Tables'!A4:H14,3,0)&" "&VL
The customer name in cell B9 is taken from the table on the Lookup Tab
listed in separate columns, we are looking them up separately and then
them together with a space in between.
Function in cell B12: =VLOOKUP($B$8,'Lookup Tables'!$A$4:$H$14,4,0)
The lookup value ($B$8) and the table ('Lookup Tables'!$A$4:$H$14) we
could copy to create the following three address formulas. After copy, w

Shipping Address
58 Langley Avenue
Aurora
NC
28307

Customer Order
Item No.
333
111
888

Name
Thingamagig
Widget
Geehaw

Price
$32.00
$28.00
$27.00

Qty
2
1
1

Charge
$64.00
$28.00
$27.00

Cells B19 and C19 contain only the VLOOKUP formula, but cells B20 through C24 have the VLOOKUP nested in an IF function.
To see why the IF function was added around the VLOOKUP, delete the Item No. in cell A19.

If VLOOKUP does not have a lookup value, it returns the #N/A error message. It looks better to have a blank cell, so the IF function is checki
entered. If so, it looks up the item number in the table. If not, it makes the cell look blank by entering "" (zero length string).

Boni Mays
Fayetteville Technical Community College

10

www.maysstuff.com

separate workbook. This example is returning information from the Lookup Tables worksheet to offer an example of a

To see the Customer Name and Address information change, enter a Customer ID from the following in cell B8:
1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 1234
Function in Cell B9: =VLOOKUP(B8,'Lookup Tables'!A4:H14,3,0)&" "&VLOOKUP(B8,'Lookup Tables'!A4:H14,2,0)
The customer name in cell B9 is taken from the table on the Lookup Tables sheet. Because the first and last name are
listed in separate columns, we are looking them up separately and then using the concatenation operator (&) to put
them together with a space in between.
Function in cell B12: =VLOOKUP($B$8,'Lookup Tables'!$A$4:$H$14,4,0)
The lookup value ($B$8) and the table ('Lookup Tables'!$A$4:$H$14) were changed to absolute references so that we
could copy to create the following three address formulas. After copy, we only had to edit the col num.
To see order information change, enter an Item No. anywhere in the A19:A24 range.
Valid item numbers are: 111, 222, 333, 444, 555, 666, 777, 888, 999, 123. To remove an
item from the Customer Order, delete only the item number and quantity.

Function in B19: =VLOOKUP(A19,'Lookup Tables'!A17:C27,2)


Function in B20: =IF(A20<>"",VLOOKUP(A20,'Lookup Tables'!$A$17:$C$27,2,0),"")

ells B20 through C24 have the VLOOKUP nested in an IF function.

A error message. It looks better to have a blank cell, so the IF function is checking to see if an item number has been
ot, it makes the cell look blank by entering "" (zero length string).

Boni Mays
Fayetteville Technical Community College

11

www.maysstuff.com

Time Functions

Time in Excel is actually stored as a decimal number ranging from 0 (zero) to 0.99999999, representing the times from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 P.M
As with dates, you can do standard math, adding and subtracting hours, easily with Excel. Functions are available for when you need to do more.
Here are a few you might find useful.

Math with Times


Difference in time
9:30 AM

Formula in Column C
5:00 PM

7:30

12:00

25:00

is the difference between the given times.

=B8-A8

is the total of the hours.

=A11+B11

Add Times
13:00

Time Functions
HOUR

Function in Column B

Returns the hour of a time. The hour is given as an integer, between 0 (12:00 A.M.) and 23 (11:00 P.M.).
2:35:27 PM
14
=HOUR(A15)

MINUTE
2:35:27 PM

Returns the minutes of a time. The minute is given as an integer, between 0 and 59.
35

=MINUTE(A18)

2:35:27 PM

Returns the seconds of a time. The second is given as an integer between 0 (zero) and 59.
27

=SECOND(A21)

Returns the decimal number for a specific hour, minute, and second combination.
2:35:27 PM 0.6079513889 Shown in time and general (decimal) format.

=TIME(A24,A25,A26)

Returns the decimal number of the time represented by a text string.


2:35:27 PM

=TIMEVALUE(A29)

SECOND

TIME
14
35
27
TIMEVALUE
2:35:27 PM
NOW

Returns the current date and time.


5/4/2016 8:27 42494.3525094
The number to the left of the decimal is the date value and the =NOW()
number to the right of the decimal is the time.
Date/Time Format
General Format

Boni Mays
Fayetteville Technical Community College

12

www.maysstuff.com

, representing the times from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 P.M.).

Format for Total


[h]:mm;@

[h]:mm;@

Function Syntax
HOUR(valid time)

MINUTE(valid time)

SECOND(valid time)

TIME(hour, minute, second)

TIMEVALUE(time in text format)

NOW()
No arguments.

Boni Mays
Fayetteville Technical Community College

13

www.maysstuff.com

Other Functions
Statistical Functions
Function
Syntax
AVERAGE
AVERAGE(number1, number2,...)
Returns the average (arithmetic mean) of the arguments.
MAX
MAX(number1,number2,...)
Returns the largest value in a set of values.

Sample Formula
=AVERAGE(I4:I43)

MIN
MIN(number1,number2,...)
Returns the smallest number in a set of values.
COUNT(value1, value2,...)
COUNT
Counts the number of cells that contain numbers
COUNTA(value1, value2,...)
COUNTA

=MIN(I4:I43)

Counts the number of cells that are not empty.


SUMIF
SUMIF(range, criteria, sum range)
Sum the values in a range that meet specified criteria.

Sample Result
32.60
19

=MAX(J4:J43)

0.84

=COUNT(J4:J43)

38

=COUNTA(G4:G43)

40
1,092.30

=SUMIF(H4:K43,"Dept 1",K4:K43)

COUNTIF
COUNTIF(range, criteria)
Count the values in a range that meet specified criteria.

=COUNTIF(G4:G43,"RT")

AVERAGEIF
AVERAGEIF(range, criteria, average range)
Average the values in a range that meet specified criteria.

=AVERAGEIF(G4:K43,"RT",I4:I43)

10
33.13

Text Functions
President George Washington, United States of America

(A23 contains sample text for text functions)

Function
Syntax
Sample Formula
Sample Result
FIND(find text ,within text, start with num)
FIND
=FIND(",",A23)
28
Locate text within a text entry and returns the number of the starting position of the text within that entry.
LEFT(text, num chars)
=LEFT(A23,9)
President
LEFT
Returns the number of leftmost characters specified.
LEN(text)
=LEN(A23)
LEN
53
Returns the number of characters in a text entry.
MID(text, start num, num chars)
=MID(A23,18,10)
Washington
MID
Returns the specified number of characters from a text entry, beginning with the specified character number.
RIGHT(text, num chars)
=RIGHT(A23,7)
America
RIGHT
Returns the number of rightmost characters specified.
Use the text functions together to work with variable text lengths in a column. This formula will always return
the text following a comma/space in a text entry:
=RIGHT(A38,(LEN(A38)-FIND(",",A38)-1))
President George Washington, United States of America
United States of America
USS Enterprise, Starfleet Command
Starfleet Command
I think that I will never see, a poem as lovely as a tree.
a poem as lovely as a tree.
Using the first example above, it works by taking the length of the text (53) and subtracting the number of
characters up to the comma (28) and an extra 1 for the space, and then returning that number (24) of characters
from the right end of the text.

Boni Mays
Fayetteville Technical Community College

14

Part Number Type


11164539
RT
11164540
AC
11164541
AB
11164542
RT
11164544
AC
11164545
DE
11164546
DE
11164547
DE
11164548
DB
11164549
DE
11164550
DB
11164551
RT
11164556
DE
11164557
AB
11164558
DE
11164559
AC
11164560
RT
11164561
RT
11164562
11164563
11164564
11164565
11164567
11164568
11164569
11164570
11164571
11164572
11164574
11164575
11164579
11164580
11164581
11164582
11164583
11164584
11164585
11164586
11164587
11164591

DE
DE
AC
RT
AB
AC
DE
DB
DE
AB
RT
AB
AC
DE
RT
AB
DE
DB
DB
RT
RT
AC

Department Cost
Quantity Total Value
Dept 2
55.30
15
829.50
Dept 5
69.58
7
487.06
Dept 4
47.87
1
47.87
Dept 2
16.22
5
81.10
Dept 5
54.36
Dept 5
74.45
13
967.85
Dept 2
52.03
11
572.33
Dept 4
25.74
8
205.92
Dept 5
39.12
14
547.68
Dept 4
10.97
3
32.91
Dept 1
18.56
12
222.72
Dept 2
45.80
17
778.60
Dept 4
88.39
2
176.78
Dept 2
79.08
12
948.96
Dept 1
15.28
7
106.96
Dept 1
2.77
15
41.55
Dept 5
40.96
Dept 3
25.07
12
300.84
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept
Dept

2
1
5
2
3
1
3
3
5
4
1
5
4
4
4
1
2
4
3
3
1
3

0.84
9.42
16.02
77.83
1.54
9.81
1.77
7.99
23.54
71.10
64.64
50.87
27.60
46.85
1.18
35.00
12.13
51.16
27.88
2.31
1.96
0.92

12
3
7
4
15
1
8
13
10
4
5
19
3
9
16
10
13
5
2
16
5
4

10.08
28.26
112.14
311.32
23.10
9.81
14.16
103.87
235.40
284.40
323.20
966.53
82.80
421.65
18.88
350.00
157.69
255.80
55.76
36.96
9.80
3.68

www.maysstuff.com

New 2007 Functions


You must have Excel 2007 to use these functions.
Function
Syntax
SUMIFS
SUMIFS(sum range, criteria range1, criteria1, criteria range2, criteria2, )
Adds the cells in a range that meet multiple criteria.
COUNTIFS
COUNTIFS(criteria range1, criteria1, criteria range2, criteria2)
Applies criteria to cells across multiple ranges and counts the number of times all criteria are met.
AVERAGEIF
AVERAGEIF(range, criteria, average range)
Average the values in a range that meet specified criteria.
AVERAGEIFS(average range, criteria range1, criteria1, criteria range2, criteria2)
AVERAGEIFS
Returns the average (arithmetic mean) of all cells that meet multiple criteria.
IFERROR(value, value if error)
IFERROR
Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula.
Part Number
11164539
11164540
11164541
11164542
11164544
11164545
11164546
11164547
11164548
11164549
11164550
11164551
11164556
11164557
11164558
11164559
11164560
11164561
11164562
11164563
11164564
11164565
11164567
11164568
11164569
11164570
Boni Mays
Fayetteville Technical Community College

Type
RT
AC
AB
RT
AC
DE
DE
DE
DB
DE
DB
RT
DE
AB
DE
AC
RT
RT
DE
DE
AC
RT
AB
AC
DE
DB

Department
Dept 2
Dept 5
Dept 4
Dept 2
Dept 5
Dept 5
Dept 2
Dept 4
Dept 5
Dept 4
Dept 1
Dept 2
Dept 4
Dept 2
Dept 1
Dept 1
Dept 5
Dept 3
Dept 2
Dept 1
Dept 5
Dept 2
Dept 3
Dept 1
Dept 3
Dept 3

Cost
55.30
69.58
47.87
16.22
54.36
74.45
52.03
25.74
39.12
10.97
18.56
45.80
88.39
79.08
15.28
2.77
40.96
25.07
0.84
9.42
16.02
77.83
1.54
9.81
1.77
7.99

15

Quantity
15
7
1
5
13
11
8
14
3
12
17
2
12
7
15
12
12
3
7
4
15
1
8
13

Total Value
829.50
487.06
47.87
81.10
967.85
572.33
205.92
547.68
32.91
222.72
778.60
176.78
948.96
106.96
41.55
300.84
10.08
28.26
112.14
311.32
23.10
9.81
14.16
103.87

www.maysstuff.com

11164571

Boni Mays
Fayetteville Technical Community College

DE

Dept 5

23.54

16

10

235.40

www.maysstuff.com

Sample Formula
=SUMIFS(F16:F55,B16:B55,"RT",C16:C55,"Dept 2")

Sample Result
2,000.52
4

=COUNTIFS(B16:B55,"RT",C16:C55,"Dept 2")
=AVERAGEIF(B16:F55,"RT",D16:D55)

43.53

=AVERAGEIFS(F16:F55,B16:B55,"RT",C16:C55,"Dept 2")

500.13
See below

error; otherwise, returns the result of the formula.


Vlookup function with valid data:
Enter Part Number:

11164539

Type:
Department:
Cost:
Quantity:

RT
Dept 2
$55.30
15

Enter Part Number:

11160000

Type:
Department:
Cost:
Quantity:

#N/A
#N/A
#N/A
#N/A

Vlookup function with invalid data:

If a lookup value is not found, vlookup returns the #N/A error. For cases when
this is not acceptable, IFERROR allows you to set an alternate value.
Vlookup nested in Iferror:
Formula in I39: =IFERROR(VLOOKUP(I37,A16:F42,2), "Invalid Part #")
Formula in I40: =IF(I39= "Invalid Part #","",VLOOKUP(I37,A16:F42,3))
Enter Part Number:
11160000
Type:
Department:
Cost:
Boni Mays
Fayetteville Technical Community College

17

Invalid Part #

www.maysstuff.com

Quantity:

Boni Mays
Fayetteville Technical Community College

18

www.maysstuff.com

Tables for VLOOKUP Sample


Customers
ID
3333
2222
7777
5555
6666
1234
1111
4444
9999
8888

Last Name
Arteaga
Barrington
Bruner
Caruso
Charlton
Getty
Givens
Haller
Keane
Mai

First Name
Ella
Cindy
Myra
Jill
Kara
William
Bryan
Geneva
Vickie
Tony

Address
58 Langley Avenue
271 Latrell Road
182 Birchwood Street
524 Ridge Road
52 Hiroko Street
81 Columbus Road
72 White Eagle Street
985 Lisa Street
47 Carolyn Avenue
732 Oregon Street

City
Aurora
Baltimore
Refugio
Spring Lake
Spring Lake
Buena Vista
Fayetteville
Spring Lake
Middleton
Madison

State
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC

Zip Code
28307
28306
28305
28390
28390
28304
28301
28390
28309
28302

Phone
(910) 413-4728
(910) 428-4137
(910) 331-5052
(910) 420-9063
(910) 384-4911
(910) 475-4153
(910) 456-5660
(910) 357-3062
(910) 473-7752
(910) 350-9309

Products
Item No
111
222
333
444
555
666
777
888
999
123

Name
Widget
Gadget
Thingamagig
Whatsit
Thingy
Dohickey
Doodad
Geehaw
Wadget
Yaknow

Price

Boni Mays
Fayetteville Technical Community College

$28.00
$21.00
$32.00
$12.00
$21.00
$47.00
$31.00
$27.00
$55.00
$14.00

19

www.maysstuff.com

Вам также может понравиться