IT Chapter 5 - Special Excel Functions
IT Chapter 5 - Special Excel Functions
https://youtu.be/atuoioWxiVw
IF Function- allows us as Excel users to basically put in some programming into our Excel spreadsheets. now
it's not exactly programming but it is quite similar to some simple programming so let's jump right in to looking
at the basics of the if function in Excel.
A B C D
1 Last Name First Name Score Pass or Fail
=IF(logical_test,
[value_if_true],
[value_if_false])
=IF(C2>69, “Pass”,
2 94
“Fail”)
Transcript
Count or CountA- help you to count the number of records that you have
Count- only counts cells in that range that have a number in them
CountA- count the total number of records but you want it to include text
A B C D E
1 Total Records with Total Records
Sales with Product
Segment Sales Cogs
=COUNT(value1, =COUNTA(value1,
value2….) value2….)
2 Government 20 15 =COUNT(B:B) =COUNTA(A:A)
Or
Highlight the column you want to count > Status Bar > Count: ____
Status Bar- have some automatic information that's brought to us by Excel and one of those bits of information
is the count, the sum of all of the numbers that are in the highlighted column, and it gives the average of the
numbers in column
-will give you all the information you need and you won't need to create account or count a formula
in other cases
Transcript
SUMIFS- count the total number of records but you want it to include text
A B C D E F G H
1 Cost of Drama
Cost of Blu-rays Cost of DVDs
DVDs
=SUMIFS(sum_r =SUMIFS(sum_r
Co =SUMIFS(sum_r
Date ange, ange,
Form Rati st ange,
Title Purchas Genre criteria_range1 criteria_range1
at ng Pai criteria_range1
ed , criteria1, , criteria1,
d , criteria1,
[criteria_range [criteria_range
[criteria_range
2, criteria2], ...) 2, criteria2], ...)
2, criteria2], ...)
The =SUMIFS(E2:E5, =SUMIFS(E2:E5,
Blu- PG- Dram =SUMIFS(E2:E5,
2 Best of 2020 30 B2:B5, “Blu- B2:B5, B3, F2:F5,
Ray 13 a B2:B5, B3)
Me ray”) F2)
Crazy
PG- Dram
3 Rich DVD 2020 20 or
13 a
Asians
=SUMIFS(E2:E5,
Tom
Blu- Come B2:B5, “DVD”,
4 and 2020 PG 10
Ray dy F2:F5,
Jerry
“Drama”)
*instead typing “Blu-ray” or
The
Dram “DVD”, you may just click the
5 Noteb DVD 2020 PG 15
a cell B2 for Blu-ray or cell B3 for
ook
DVD
Ctrl + Shift + Down Arrow- highlight the information from the point that you selected all the way down
Transcript
AVERAGEIFS- count the total number of records but you want it to include text
A B C D E F G H I J
1 Average Average Average Average
Score of Score of Score of Score of
Grade 7 Grade 8 Grade 9 Grade 10
Gr Stu
Te =AVERAGEIF =AVERAGEIF =AVERAGEIF =AVERAGEIF Average
Stud ad de
st Sc S(average_r S(average_r S(average_r S(average_r Score of
ent e nt
Sc ho ange, ange, ange, ange, 7th
Na Le Nu
or ol criteria_rang criteria_rang criteria_rang criteria_rang Graders
me ve mb
e e1, criteria1, e1, criteria1, e1, criteria1, e1, criteria1, from PES
l er
[criteria_rang [criteria_rang [criteria_rang [criteria_rang
e2, criteria2], e2, criteria2], e2, criteria2], e2, criteria2],
...) ...) ...) ...)
=AVERAGEIF =AVERAGEIF =AVERAGEIF =AVERAGEIF
QUIT 096 PE
2 7 79 S(D2:D9, S(D2:D9, S(D2:D9, S(D2:D9,
EVIS 6 S
B2:B9, B2) B2:B9, B3) B2:B9, B4) B2:B9, B5) =AVERA
RAG 096 TE GEIFS(D2
3 8 84
ASA 7 S :D9,
RAP 096 PE B2:B9,
4 9 89
ADA 8 S B2, E2:E9,
REB E2)
096 TE
5 ULD 10 94
9 S
ELA Or
REP
097 PE
6 OTO 10 76 =AVERA
0 S
LA GEIFS(D2
RIG 097 TE :D9,
7 9 81
OR 1 S B2:B9,
ROS 097 PE B2, E2:E9,
8 8 86 “PES”)
ETE 2 S
SAL
097 TE
9 GA 7 91
3 S
DO
Transcript
A B C D E F G H
1 Month Year
Date Area Code Zip Code Added Added
Student Adde Phon =LEFT(text, =RIGHT(text, =MID (text, =
Address
Name d to e (num_chars (num_chars start_num, RIGHT(text,
List )) )) (num_chars (num_chars
)) ))
101 Hope
Wed, Ln,
(814)
Jun Martinsburg, =RIGHT(C2, =MID(B2, 6, =RIGHT(B2,
2 QUITEVIS 793- =LEFT(D2, 5)
29, Pennsylvani 5) 3) 4)
3164
1988 a (PA),
16662
5151 Stires
Sun,
Dr NW, (330)
Oct
3 RAGASA Malvern, 863-
16,
Ohio(OH), 0865
1988
44644
1260 Ky 689
Wed,
Rte, (606)
Nov
4 RAPADA Flatgap, 265-
21,
Kentucky(KY 3528
1990
), 41219
50025
Fri, Jefferson
(586)
REBULDEL Jan Ave, New
5 725-
A 18, Baltimore,
8928
1991 Michigan(MI
), 48047
Advanced Excel - VLOOKUP Basics
https://youtu.be/y8ygx1Zkcgs
Argument
Argument 1- lookup value
Argument 2- table array
And so on…
A B C D E F G
1 Rating
=VLOOKUP(lookup_value,
Date Cost
Title Rating Genre Location table_array,
Purchased Paid
col_index_num,
[range_lookup])
The Best =VLOOKUP(G3, A2:F5, 3,
2 2020 PG-13 30 Drama Living Room
of Me FALSE)
Safe Living Room
3 2020 PG-13 20 Drama Safe Haven
Haven
Tom and Basement
4 2020 PG 10 Comedy
Jerry
The
5 2020 PG 15 Drama Basement
Notebook
How to Extract Data from a Spreadsheet using VLOOKUP, MATCH and INDEX
https://youtu.be/NaBakFrIZkA
A B
1 Order# Sale Amount
=VLOOKUP(A2,
2 1001
data, 8, FALSE)
3 1002
4 1003
A B C D E F G H
1 Order First Last
State Variety Price/lb. Pounds Sale
# Name Name
Tito
2 1001 QUITEVIS MI Ethiopia 8 5 40
Simon
Mary
3 1002 RAGASA CA Ethiopia 8 12 96
Rose
Jana Blue
4 1003 RAPADA NY 12 11 132
Mae Mountain
A B
Order from the
1 Order#
above table
=MATCH(A2,
2 1001
order_number, 1)
3 1002
4 1003
A B C D E F G H
1 Order First Last
State Variety Price/lb. Pounds Sale
# Name Name
Tito
2 1001 QUITEVIS MI Ethiopia 8 5 40
Simon
Mary
3 1002 RAGASA CA Ethiopia 8 12 96
Rose
Jana Blue
4 1003 RAPADA NY 12 11 132
Mae Mountain
A B C
1 Row # Column # Last Name
=INDEX(data, A2,
2 1 3
B2)
3 2 3
4 3 3
Transcript (textbased)
When you need to find and extract a column of data from one table and place it in another, use the
VLOOKUP function. This function works in any version of Excel in Windows and Mac, and also in Google
Sheets. It allows you to find data in one table using some identifier it has in common with another table. The
two tables can be on different sheets or even on different workbooks. There is also an HLOOKUP function,
which does the same thing, but with data arranged horizontally, across rows.
The MATCH and INDEX functions are good to use when you’re concerned with the location of specific
data, such as the column or row that contains a person’s name.
Using VLOOKUP
When VLOOKUP finds the identifier that you specify in the source data, it can then find any cell in that row
and return the information to you. Note that in the source data, the identifier must be in the first column of
the table.
A unique identifier should be like a serial
number, where no two are the same in the same table.
Syntax
The syntax of the VLOOKUP function is:
=VLOOKUP(lookup value, table range, column number, [true/false])
Here’s what these arguments mean:
Lookup value. The cell that has the unique identifier.
Table range. The range of cells that has the identifier in the first column, followed by the rest of the
data in the other columns.
Column number. The number of the column that has the data you’re looking for. Don’t get that
confused with the column’s letter. In the above illustration, the states are in column 4.
True/False. This argument is optional. True means that an approximate match is acceptable,
and False means that only an exact match is acceptable.
We want to find sales amounts from the table in the illustration above, so we use these arguments:
Transcript
A B C D E F G
1 Product or
First Last Total Begin Begin Customer
Service
Name Name Purchases Date Time Profile
Number
=A2&” Outcome:
“&B2&”:”&” TITO
TITO 12:27:39
2 QUITEVIS 40 4/23/2002 88478342 “&”$”&C2 SIMON
SIMON PM
QUITEVIS:
$40
MARY 12:50:15
3 RAGASA 533 12/3/2012 96653328
ROSE PM
JANA 2:17:40
4 RAPADA 172.72 7/27/2004 92974694
MAE PM
Use Format Painter to copy the formatting of row labels beside customer profile
Quick Access Toolbar > More Commands > Commands Not in the Ribbon > Form > Add > Ok
A B C D
1 Employee
Name Hire Date Department
Number
TITO
2 SIMON 4/23/2002 88478342 Sales
QUITEVIS
MARY
Customer
3 ROSE 12/3/2012 96653328
Service
RAGASA
JANA
4 MAE 7/27/2004 92974694 Communications
RAPADA
Criteria
Transcript
https://youtu.be/Z_-RtrcYGPk
DIV/0 ERROR
In cell F2, change the formula by typing the IFERROR FUNCTION (IFERROR(value, value_if_error)
=IFERROR(D2/E2, ““)
*Also, make sure that the column/row is formatted correctly either as text/general.
=IFERROR(VLOOKUP(H8, A3:F24, 3, FALSE), “Not in inventory”)
NAME ERROR
Other example:
Other error messages:
Transcript
*There should no be space in between cell range being added. It should have been comma, not space.
NUM ERROR- when you have a formula that produce an invalid number
-rarely happen too when there is too big or too small for excel to display
SQRT Function- returns the square root of a number
Other example:
#### ERROR- excel can not fit the contents of the cell in the space provided
Just click and drag the line between D and E
or
Double click on the line between D and E
Transcript
VALUE ERROR- when you use the wrong function argument or often what it is is you're trying to combine
different types of data that really don't go together so like a number plus a text or maybe you're multiplying
a word by a number that won't make sense in most cases
Other example:
Another example:
Another example:
Simply typing dollar sign. Solution is that use the proper way by clicking More accounting formats in
Number group.
Transcript
3. Text Import Wizard will pop up so be sure to check My data has headers. Then click Next.
4. Select Delimiters. Down below you can see a data preview. Click Next.
1. Go to Data Tab > Get & Transform Data > From Text/CSV
3. It wants to know what the delimiter is it guessed right. We come down to Load> Load to and it's
4. Select how you want to view this data in your workbook (Table, PivotTable Report, PivotChart, Only
Create Connection), where do you want to put the data (Existing worksheet or New worksheet) and check
Add this data to the Data Model. Click OK.
5. Under Queries & Connections, we can see that five thousand rows have been loaded using power
query. In connections, we can see this file was loaded using the text import wizard if either one of these text
file changes, you can right click > refresh over here even though it doesn't look like it's connected
anywhere we can right click refresh.
6. Now as a text file bonus, if we don't have tab as a delimiter about a comma, then when we click from
text we see something like this, click import and there it is. It picked up that this is a comma. Load to, click
OK.
7. Bonus number two. What if you have a modern version of Excel and you don't want to import it as a
table you want to use the legacy 3-step wizard to just dump it as some data well guess what, under tab
data, there's the legacy wizards and the way you add this option is under file options > data. Look at that I
happen to really like the web legacy version. You can check whichever ones you'd like.
Transcript