IntroductionWelcome| 00:00 | (Music playing.)
| | 00:03 | Hello! I am Dennis Taylor and I am pleased to
present Excel 2007 Advanced Formulas and Functions.
| | 00:11 | If you are like most Excel users, you
want to know more about this software.
| | 00:15 | You used some of the other 300-plus
functions, but you realize that you might
| | 00:19 | be missing something.
| | 00:20 | Shouldn't there be a better way
to do what it is you are doing?
| | 00:24 | In this course, I'll show you practical
examples of some of the advanced formulas
| | 00:28 | and functions in Excel to make you
more confident as you work with your data.
| | 00:33 | I'll start by giving you some great
shortcuts and tips to speed your work in Excel,
| | 00:38 | then a quick review of the
basic functions as a foundation.
| | 00:41 | I'll show you the powerful If
function and a variety of LOOKUP functions,
| | 00:45 | including VLOOKUP, Match and Index to help
you find exactly what you are looking for.
| | 00:51 | You'll see how to use some vital Math
and Financial functions and how to work
| | 00:54 | with the very useful Date functions
to analyze data in a variety of ways.
| | 00:59 | I'll teach you how to use powerful
Array formulas and functions to expand
| | 01:03 | your analytical powers, and use a
few indispensable text functions to
| | 01:07 | organize your data.
| | 01:09 | Finally, I'll show you a dazzling
technique for creating multi-tiered pick-lists
| | 01:13 | via the obscure Indirect function.
| | 01:16 | With this wealth of tips and
practical examples, I know you'll be ready to
| | 01:19 | tackle more Excel challenges in
ways you never thought possible.
| | 01:24 | So let's get started working on Excel
2007 Advanced Formulas and Functions.
| | Collapse this transcript |
| Using the exercise files| 00:00 | If you are a premium member of the lynda.com
Online Training Library or if you
| | 00:05 | are watching this tutorial on a DVD-ROM,
you have access to the exercise files
| | 00:10 | used throughout this title.
| | 00:12 | In the Exercise Files folder, you will
see the names of each of the chapters.
| | 00:18 | Simply double-click on the chapter you're
interested in, for example, Chapter 1 Tips.
| | 00:24 | The worksheet tabs correspond with the
names being presented within the chapter.
| | 00:29 | Occasionally, more than one
worksheet will be used at the same time.
| | 00:33 | In chapter 1, one of the examples does
involve use of the East, South, Midwest
| | 00:39 | and West sheets, as well as a Summary sheet.
| | 00:42 | In most other examples, a particular
movie will be devoted to just one sheet
| | 00:47 | tab, for example, highlighting formulas is
all discussed when the sheet tab is present.
| | 00:52 | So, the name of each worksheet is the
critical aspect to this, and that's going
| | 00:56 | to be true in all the different chapters.
| | 00:59 | If you don't have access to the
Exercise Files, you can follow along from
| | 01:03 | scratch or with your own assets.
| | 01:05 | Let's get started.
| | Collapse this transcript |
|
|
1. Formula and Function Tips/ShortcutsUsing the entire row/column references| 00:00 | There are many times in Excel when we
need to add up data, either averages
| | 00:04 | sums, and in this particular worksheet,
there are about 700 names and certainly it
| | 00:09 | would be a reasonable thing to want to
know the total amount of salaries being
| | 00:13 | allocated, and possibly the average of
the job ratings that we are seeing, could
| | 00:17 | imagine doing the average for
the number of years as well.
| | 00:20 | Now do take advantage of the fact that
sometimes in Excel you don't even need to
| | 00:24 | write formulas, and simply by clicking
column F, there is some good valuable
| | 00:29 | information on this screen in the
Status Bar, at the bottom of the screen. And
| | 00:34 | you'll notice here, and if you are
trying this yourself you might not see
| | 00:37 | exactly these same entries, even if you
are working with the same data, a total
| | 00:42 | 37,268,000, a minimum and maximum,
a count of the numbers, and also an average.
| | 00:50 | You do have control over this and
in Excel, anytime you highlight two or
| | 00:56 | more cells that contain values you
are likely to see some information
| | 01:00 | within the Status Bar.
| | 01:01 | Now, if you happen to right-click in
the Status Bar, you'll notice that in
| | 01:06 | this particular section here of the
list of choices you do have control over
| | 01:10 | what's being displayed.
| | 01:12 | Now, over time, you may have some
favorites, and as you think out ahead of time,
| | 01:16 | you might be saying to yourself, "Well,
when I highlight data, it certainly will be
| | 01:19 | "worthwhile for me to see the average
and the sum, but may be not be others."
| | 01:23 | You'll decide on your own, which of
these you would like to see, and of course,
| | 01:27 | you can change your mind at any time.
| | 01:29 | So for the moment, I've changed this to
show only the average, the minimum, the
| | 01:33 | maximum and the sum.
| | 01:35 | And that's true anytime you highlight
two or more cells and why not, in this
| | 01:40 | particular case, select the entire column
and also perhaps with Job Rating to see
| | 01:45 | what the average job rating might be.
| | 01:47 | Or the average years of service,
let's click column E. So I think you can
| | 01:52 | see the value of this.
| | 01:53 | Let me also point out there will be
times when you are actually trying to
| | 01:56 | create formulas because you want
them in the worksheet at all times.
| | 02:01 | Now, maybe this is not the best place
to put a total, but let's suppose you want
| | 02:05 | to put a total here of those salaries.
| | 02:08 | Many of you are familiar
with the AutoSum button.
| | 02:11 | You'll find it on the Formulas
tab as well as on the Home tab.
| | 02:16 | Now, on the Home tab you'll find it
way out in the Editing group, on the
| | 02:19 | right-hand side of the ribbon.
| | 02:21 | If you click AutoSum, as is usually
the case, AutoSum makes a guess on
| | 02:26 | surrounding data as to what it
feels that you might want to add.
| | 02:30 | In this case, of course,
the guess is completely off.
| | 02:32 | We do want to add up all the salaries.
| | 02:35 | Now, it certainly isn't wrong to start
highlighting the cells this way and if
| | 02:39 | we only wanted to do these for a
certain department, you could imagine doing
| | 02:42 | this sort of thing.
| | 02:44 | But let's say that you know this data
well enough to know there is nothing else
| | 02:48 | in column F except values and the title on top.
| | 02:52 | So why not just click the entire column letter.
| | 02:54 | Now that works beautifully, there is
the entire function, add up everything in
| | 02:59 | column F, and we're done,
Enter, and there is the total.
| | 03:04 | And you can certainly do that with
rows where the situation calls for it.
| | 03:07 | Now it's going to be much less likely
that you are going to need that, but if
| | 03:10 | we wanted to do a total, imagine this on
another worksheet with the appropriate data -
| | 03:15 | maybe we'll just click AutoSum again -
and imagine if the data were valid, we can
| | 03:20 | click row 7 and that would
add up all the data in row 7.
| | 03:24 | In this case, obviously, it's a
case of apples and oranges.
| | 03:26 | We wouldn't be adding that data, but
that's how the function would work and it
| | 03:30 | would work properly, given
the appropriate set of data.
| | 03:34 | Not only can you use the Sum function,
but any other function that might be
| | 03:37 | appropriate for your needs.
| | 03:38 | So if you'd like to do an average for
each column, or possibly a sum, or a standard
| | 03:43 | deviation, or median, or any other
function that you might need to use, you can
| | 03:47 | use an entire column reference, and keep
that in mind as you work with functions,
| | 03:51 | maybe, that you haven't
worked with very frequently.
| | 03:53 | It's a quick way to get good summary
information without going through the drudgery
| | 03:58 | of highlighting cells manually.
| | Collapse this transcript |
| Copying column formulas instantly| 00:00 | If you need to copy either text, or
values, or a formula down a column, here is a
| | 00:06 | shortcut you can't really do without,
particularly if you work with formulas.
| | 00:10 | In cell H2, let's actually create a
formula for a person's new salary, existing
| | 00:17 | salaries in column F, and in cell J1 is a
percentage of increase that's going to be
| | 00:22 | applied to everybody's salary here.
| | 00:25 | So the initial formula, which could vary,
could be something like this = F2, click
| | 00:31 | on it, type it, times J1 and looking
ahead here, you can see that if this
| | 00:37 | formula is going to be copied down
column H, the F2 will become F3, F4 etcetera,
| | 00:43 | that's appropriate, but
J1 would turn into J2, J3.
| | 00:47 | So we need to make this an absolute
reference. And rather than typing the
| | 00:50 | dollar sign, which is okay,
| | 00:51 | the fastest way to do this is simply
to hit the Function key, F4, to make that
| | 00:56 | an absolute reference.
| | 00:57 | And to complete the formula in this
particular style of a formula, let's simply
| | 01:01 | add on, or add to it, the
original salary.
| | 01:05 | So that's one of a few different
ways we could write this formula.
| | 01:08 | And a small tip here.
| | 01:09 | If you are about to copy information
down a column, rather than hitting Enter
| | 01:14 | and have the active cell move away
from this location, simply press Ctrl+Enter
| | 01:18 | and the active cell will
not move from its location.
| | 01:22 | Now, there are about 700 entries in
this particular list, and copy/paste is not
| | 01:27 | the way to go here, and if you have been
working with formulas you probably don't
| | 01:30 | do that, but very often, you're likely to
drag, from that lower right-hand corner,
| | 01:36 | it's called the Fill Handle,
| | 01:37 | drag this down the column,
and that's really not wrong.
| | 01:40 | But think of how much time that's
going to take if you've got not just 700
| | 01:44 | entries, but maybe 7000, 70,000.
| | 01:47 | On Excel 2007, this could be as many as a
million, slightly even over a million rows.
| | 01:52 | So dragging could be, if you pardon the pun, a
real drag. Instead, let's double-click the
| | 01:59 | lower right-hand corner.
| | 02:01 | Now, right away the question would
come into your mind, "Did it get copied all
| | 02:04 | "the way down to the bottom of the
list, or how far did it get copied?"
| | 02:08 | Anytime you highlight a range of cells,
either manually or by way of a formula,
| | 02:13 | if you hit the Ctrl+Period sequence a
few times, Ctrl+Period, this simply moves
| | 02:19 | the active cell around the
corners of the selected range.
| | 02:23 | So, in this case, it's simply
moving from cell H2 down to H709.
| | 02:27 | I am just hitting Ctrl+Period here, and
that's a good verifier, and if you know
| | 02:32 | your data, you would know that
there is nothing below that row in this
| | 02:36 | particular set of data.
| | 02:37 | That's Ctrl+Period.
| | 02:39 | But the shortcut, of course, is the idea
that by double-clicking we copy whatever is
| | 02:43 | in this cell, whether it's text, a value, or
a formula, rapidly down the column, and it
| | 02:49 | is dependent upon what is visible
in the first column to the left.
| | 02:54 | Now, notice I used the word visible.
| | 02:56 | Let me do an undo here. I'll use the
Undo button in the Quick Access toolbar,
| | 03:02 | and now we'll remove one of the job ratings
| | 03:04 | so let's act as if maybe it hadn't been
completed yet, and there might be some other
| | 03:08 | empty cells, as well, in column G.
| | 03:11 | This time, as I double-click here, note
that the information only gets copied to here.
| | 03:17 | If you knew that column G had multiple
blank cells scattered throughout the list,
| | 03:24 | this would be unfortunate and it
would take you a long time to fill in the
| | 03:27 | information if you were
using the double-click method.
| | 03:30 | So if that were the case,
let me do another Undo here,
| | 03:34 | if you knew the column G had a number of
blanks in it, then you would hide column
| | 03:38 | G, right-click and Hide, and the next
time you try this it will follow the first
| | 03:44 | visible column to the left.
| | 03:46 | And in this case, all of the salaries
have been completed, so by double-clicking
| | 03:49 | here and then hitting Ctrl+Period
for that quick check,
| | 03:53 | it too gets copied down to
row 709 here. We're all set.
| | 03:57 | That works properly.
| | 03:59 | The other question might be, "What
happens if the column to the left is empty,
| | 04:02 | "that first visible column?"
| | 04:04 | Let me do a couple of Undos
and create that situation,
| | 04:07 | this time on purpose. I'm going to
insert a new column to the left column H
| | 04:12 | that's empty. Double-clicking here,
nothing happens.
| | 04:16 | But, if there is information in the
column to the right, and I'll just quickly
| | 04:20 | throw on some information here, hit Ctrl+Enter.
| | 04:23 | Now we'll try double-clicking.
Look what happens.
| | 04:27 | When the column to the left is empty, at
least in these cells, double-clicking the
| | 04:32 | lower right-hand corner follows the
first visible column to the right,
| | 04:36 | if there is data there, and then copies
the information until it sees an empty cell there.
| | 04:41 | So, by using this particular shortcut
you can see how, whether it's text, or
| | 04:46 | values, or on the cases we have seen
formulas, it's a very efficient and fast way
| | 04:51 | to copy information down a
column without much effort.
| | Collapse this transcript |
| Converting formulas to values with a simple drag| 00:00 | After creating formulas, there will be
times when you effectively don't want to
| | 00:04 | keep the formula in a cell.
| | 00:05 | You want to keep the actual result.
| | 00:08 | Now, having many, many formulas in a
particular range, or in a worksheet,
| | 00:12 | sometimes does take up not only more
space but also requires some time because
| | 00:16 | of recalculation every time
we make worksheet changes.
| | 00:19 | So let's imagine the example here
in column H, about 600 names or so.
| | 00:24 | And we've got formulas calculating New Salary.
| | 00:27 | Perhaps you've reached that time when
you want to say that you'd like to have
| | 00:31 | these salaries replace the ones that are
the origin over in column F. You may, on
| | 00:37 | the other hand, want to keep these new
salaries here, perhaps re-label the column
| | 00:41 | headings, but there are times when you
would be saying, like here, "Let's not have
| | 00:45 | "these formulas here.
| | 00:46 | "Let's just keep the results."
| | 00:48 | The standard way to handle this is a
somewhat cumbersome technique of copying
| | 00:53 | these values and then using
Paste special values and so on.
| | 00:57 | Let's make this really fast.
| | 00:59 | Now, two different approaches here. If we
want this data here to replace the data
| | 01:04 | in column F, we, effectively,
would select these values.
| | 01:08 | So how can you do that somewhat quickly?
| | 01:10 | By simply clicking on the top cell, hold
down the Shift key and double-click the
| | 01:15 | bottom edge. Now that
highlights the entire set of data.
| | 01:20 | If you hit Ctrl+Period, this will move
the active cell to the top of the range.
| | 01:26 | I can see what's happening
there, they've all been selected.
| | 01:28 | You can certainly do that by dragging as
well and it will stop when you use this
| | 01:32 | technique once you get to
the bottom of the column.
| | 01:36 | Rather than going through the multi-
step copy, paste special, with the right
| | 01:40 | mouse button, drag this
information on top of the old data.
| | 01:45 | That's over in column F.
| | 01:46 | With the right mouse button, drag any edge.
| | 01:49 | As soon as we get to the destination, you
can let go and Copy Here as Values Only.
| | 01:56 | Keep an eye on, say, the top salary, the 59,246.
| | 01:58 | We are now about to see that
over in cell F2. It is in H2.
| | 02:04 | It's going to move over into F2.
| | 02:09 | Now, meanwhile, we've got some new
salaries here, they're irrelevant, but
| | 02:12 | here is the value that had been
displayed in H2. It was actually a formula and now it's
| | 02:17 | over here as a value.
| | 02:19 | So, in effect, we took those new salaries
and replaced the old salaries right here.
| | 02:24 | This information we wouldn't need anymore,
perhaps get rid of the entire column if
| | 02:28 | that seems appropriate, but, again, this
information right here is not relevant,
| | 02:32 | but we quickly were able to copy this
information over here and throw away the
| | 02:36 | formulas at the same time.
| | 02:38 | Now there is a similar situation.
| | 02:39 | You might use this over in column N.
You see order dates and shipping dates and
| | 02:45 | simple formulas here, subtracting
the two to figure out the time elapsed.
| | 02:50 | Perhaps it is at the time when you say
you no longer need the formulas here.
| | 02:55 | A lot of these you could have done in your
head anyway, but there are formulas. We
| | 02:57 | simply want to turn these into their values.
| | 03:00 | Now, in this situation, we don't really
want to put them into another column.
| | 03:04 | We want them to stay right here, and so
it might seem a little bit strange but
| | 03:08 | what you'd want to do here is
essentially drag this information into another
| | 03:13 | location and then right back
on top of the current data.
| | 03:16 | It might be faster here to drag the top
edge, but it can be any edge, and once
| | 03:22 | again, with the right mouse button.
| | 03:23 | Remember, every cell here
that's highlighted is a formula.
| | 03:27 | It subtracts the two dates from the left.
| | 03:30 | So by highlighting the data and
dragging any edge with the right mouse button
| | 03:34 | away from the data, I'm going up here
and then back down on top of it, let go
| | 03:39 | with the mouse, Copy Here as Values Only.
| | 03:43 | This is not a formula anymore.
| | 03:44 | It's the value 2 and the value 4, and you can
verify that by seeing this in the Formula bar.
| | 03:50 | So there are numerous situations
when you have copied information, you've
| | 03:54 | cleaned up information, you've got
formulas and in effect, you want to say, "I
| | 03:59 | "don't want these formulas anymore.
| | 04:00 | "I just want to keep the results."
| | 04:02 | So the techniques we've seen here
allow us to do this quickly and easily.
| | 04:06 | I want to show you one more variation on this.
| | 04:08 | You can do this with the toolbar as well.
| | 04:11 | So let me do an Undo, and this isn't
quite as fast as the dragging method, but
| | 04:15 | it has its merits as well.
| | 04:17 | With the data highlighted here and
these being formulas again, on the Home tab,
| | 04:23 | you can click the Copy button and then
jump over to the Paste arrow and choose
| | 04:28 | Formulas, and that's pretty fast too.
| | 04:31 | And to get rid of those
Marquee lights simply hit Escape.
| | 04:34 | Different methods of quickly
turning formulas into values.
| | Collapse this transcript |
| Creating 3D formulas to gather data from multiple sheets| 00:00 | On your screen, you're seeing
sales totals for an Eastern region.
| | 00:05 | I'm going to switch to the next
worksheet to the right to display a similar
| | 00:09 | worksheet that's showing sales totals
for the South region, and then the next
| | 00:13 | sheet over in Midwest.
| | 00:15 | Each of these worksheets has the exact
same layout, and there's a West sheet as well.
| | 00:21 | You'll recognize there are formulas in
Row 8, in all cases here, and in Row 9,
| | 00:27 | and in Column G we've got
totals as well, and in Column H.
| | 00:34 | Each worksheet has exactly the same layout.
| | 00:37 | And also created here is a Summary sheet,
and it too has formulas in place, but
| | 00:42 | there's no information here.
| | 00:44 | So that's why these look a little bit strange.
| | 00:46 | The division by 0, it's trying to
simply perform a calculation that for the
| | 00:50 | moment is inappropriate.
| | 00:52 | But this particular worksheet is an
exact copy of the others, with no data here.
| | 00:57 | Now, you could imagine a similar
situation dealing with data where you might
| | 01:01 | have 12 separate sheets, data for each month.
| | 01:05 | You might have different fiscal
year data, five, six years potentially.
| | 01:09 | You could have information from the 50 states,
| | 01:12 | any number of different scenarios
where it is appropriate to have the same
| | 01:16 | layout worksheet after
worksheet after worksheet.
| | 01:20 | And sure enough, on a Summary sheet
what we would like to be able to see here
| | 01:23 | is a total, in all of these cells, that shows
the information from the four other sheets.
| | 01:29 | A standard way to do this, and not an
incorrect way, would simply be to position
| | 01:33 | the active cell on the Summary sheet
and write a formula, and you'll notice in
| | 01:37 | this formula there will be practically
no typing, except for the initial equals
| | 01:42 | and some occasional pluses.
| | 01:44 | So we are on the Summary sheet here.
| | 01:46 | I just clicked equals.
| | 01:48 | Now let's jump to the East sheet, click
there, and we are about to show you the
| | 01:53 | Disk Drive Retail total there.
| | 01:55 | Click on the East sheet, click
this cell, and put in a plus.
| | 02:00 | And now we will go to the South sheet,
click on the appropriate cell again.
| | 02:04 | It's B4, put in a plus.
| | 02:06 | The formula is building in the formula bar.
| | 02:08 | We will click on Midwest,
click that cell, click plus.
| | 02:13 | And then West, click the cell in
question, we are all done. Enter.
| | 02:18 | I am going to make the
column wider so we can see this.
| | 02:22 | And I think you could agree, the
information is accurate. It's correct.
| | 02:27 | We could go back and look at
the numbers. It is correct.
| | 02:30 | But the formula is a little bit
dismaying in the sense that, although valuable,
| | 02:33 | what might we do if it were
12 months, or if it's 50 states.
| | 02:37 | This is a lot of jumping back and forth.
| | 02:39 | You will notice that range
names are automatically followed by
| | 02:42 | exclamation points.
| | 02:43 | If you find yourself typing range names,
you're probably going down the wrong path.
| | 02:48 | Stop, and go click on them instead.
| | 02:50 | Who wants to type when you can use this method?
| | 02:53 | And one other bit of note here too.
| | 02:55 | If a range name has a space in it,
you will also see single quotes here.
| | 02:59 | That's not the case here, so
we wouldn't worry about it.
| | 03:02 | So this could be just fine, if you don't
mind clicking back and forth to create this.
| | 03:06 | We could then copy this into the other cells.
| | 03:08 | That's not a huge amount of work.
| | 03:10 | But we do want to show you a faster
way to do this, when you're dealing
| | 03:13 | with multiple sheets.
| | 03:15 | Again, imagine that 50 state scenario here.
| | 03:18 | So instead of this, let's
approach this in a different way.
| | 03:21 | On the Home tab, in the Editing group,
let's begin with the AutoSum button.
| | 03:26 | Simply click it once, and this is one of
those rare times where the Sum function
| | 03:30 | can't see any data around, there is
nothing to guess at, so it simply saves us a
| | 03:34 | little bit of typing here.
| | 03:36 | Now, the next two steps are the
crucial ones, and not the obvious ones.
| | 03:41 | Let's say we want to add up all the
data on the sheets East through West.
| | 03:45 | We have got four sheets here.
| | 03:46 | Remember, there could be many, many sheets.
| | 03:49 | The first thing to do here is to click on
the East sheet, and it shows us the East sheet.
| | 03:54 | And the unusual step here, hold down
the Shift key as you click the West sheet,
| | 04:02 | and that essentially picks
up all the intervening sheets.
| | 04:05 | In this case, only two, but there could be many.
| | 04:07 | And in the formula bar, you will see
how the formula is being constructed.
| | 04:11 | What it lacks is a
reference to the specific cell.
| | 04:14 | In this case, it's going to be B4.
| | 04:17 | Click there, and you will notice a
strange change here as we complete the entry.
| | 04:22 | Right now you see single quotes.
| | 04:24 | Don't worry about them.
| | 04:25 | As soon as we hit Enter here,
the formula is complete.
| | 04:28 | Same answers we saw before,
but this is what it looks like.
| | 04:33 | And imagine that scenario. If these
were the 50 states, if they had been
| | 04:36 | alphabetized, that might say
Alabama:Wyoming, something like that.
| | 04:40 | If it's 12 months, it's likely to
say January:December, and so on.
| | 04:44 | Try that a few times and
you realize how fast it is.
| | 04:47 | This only works in situations where you
have got identical layouts in your worksheets.
| | 04:52 | So the situation here, we are
always looking for cell B4 here.
| | 04:55 | Now, once that is done, we can double-
click or simply drag this down two cells,
| | 05:00 | drag it across, and readjust that
column width, and we are all set.
| | 05:06 | This truly is a Summary worksheet.
| | 05:09 | Now, every one of these formulas,
let's just pick one at random.
| | 05:12 | We can double-click and see the formula there.
| | 05:14 | They all operate along the same principles.
| | 05:17 | If you move any sheet that happens to be
between East and West, if you move them
| | 05:21 | within those confines, nothing changes here.
| | 05:25 | If, for example, if we were to take out
the South sheet here, our totals would
| | 05:29 | drop, but it wouldn't
disrupt any of these formulas.
| | 05:33 | If we were to create a new mountain
region here and had it somewhere between
| | 05:36 | East and West, the formulas
would not need to be recreated.
| | 05:41 | The information would automatically be included.
| | 05:43 | So you have got the same kind of
flexibility that you might have with a Sum
| | 05:46 | function that adds up data in a column.
| | 05:49 | When you insert rows between the
top and bottom, they are automatically
| | 05:52 | included, and if you delete
them, that data gets removed.
| | 05:55 | So a similar kind of layout situation.
| | 05:57 | But this 3D formula,
there is no question about it.
| | 06:00 | It's extremely powerful, and the more
worksheets you have, the more powerful it is.
| | Collapse this transcript |
| Updating values without formulas| 00:00 | Changing worksheet values
is often an arduous task.
| | 00:03 | Sometimes it's simply a lot
of drudgery of data entry.
| | 00:07 | At other times, you have to write
formulas and copy and paste, and it's not
| | 00:10 | always a lot of fun.
| | 00:12 | Sometimes though, you have got
information that needs to be updated, and you can
| | 00:15 | do it without formulas.
| | 00:17 | Take a look at the list here of values
for the first six months, for various
| | 00:22 | states, and let's imagine that these
particular values that were entered here
| | 00:27 | maybe were done manually.
| | 00:29 | Whoever came up with these values
made a mistake in the calculations, and
| | 00:33 | these are all off by 5.
| | 00:34 | So we would like to bump them up by 5.
| | 00:37 | Possibly, in another situation, they
need to be decreased by a certain value.
| | 00:42 | But let's say we want to do the same
thing to every one of these cells, in
| | 00:46 | this cluster, right here.
| | 00:48 | So ,suppose it is that we want
to make them all bigger by 5.
| | 00:52 | In an empty cell, somewhere
nearby, put in the value 5.
| | 00:55 | We can later get rid of it.
| | 00:57 | Simply copy it, Ctrl+C, right-click copy,
all the different ways that you might copy.
| | 01:02 | Highlight the data in question,
right-click, Paste Special, and Add.
| | 01:10 | Now, keep an eye on at least one or two of the
numbers, just to see that it will have changed.
| | 01:15 | Click OK.
| | 01:16 | And the numbers are larger by
5, every single one of them.
| | 01:20 | And you will notice that none of
these have any formulas in them.
| | 01:23 | Some people would be worried about this
feature, because there is no, as we say,
| | 01:27 | paper trail here, no formulas to
remind us what these might have been.
| | 01:31 | We simply changed all the values here by 5.
| | 01:36 | Now, let's not confine this just to addition.
| | 01:39 | Certainly that could have
been subtraction, as I suggested.
| | 01:43 | How about this list on the right, maybe
in a different context, even though it's
| | 01:46 | similar kinds of data?
| | 01:47 | What if this represents current year
data, and you have copied it and pasted
| | 01:52 | it somewhere else, and you would like to
show these new values at a level 10% bigger?
| | 01:57 | Now, there will be decimals,
and we will deal with that.
| | 02:00 | So a little bit of math in your head
will suggest that the 40s here will become
| | 02:03 | 44s, the 50s will become 55s, and the
other ones will involve some decimals, but
| | 02:09 | again, the need is we want
these all to be 10% bigger.
| | 02:13 | Now, depending upon the percent,
you'll do the math in your head.
| | 02:17 | A lot of you would know that to make
these 10% bigger, we can multiply them by 1.1.
| | 02:22 | So once again in an empty cell somewhere,
anywhere we choose, put in 1.1. Copy that value.
| | 02:31 | Highlight the cells that we
want to change. Right-click.
| | 02:36 | Paste Special.
| | 02:37 | This time, it's going to be Multiply,
and let's speed it up a little bit.
| | 02:40 | Double-click Multiply.
| | 02:43 | And those cells that had been 40s, right
here, are 44s, the 50 became a 55, and so on.
| | 02:50 | And to see the true values here, we
would highlight these, and on the Home tab,
| | 02:55 | in the Number group, perhaps a quick way
to do this would be to click the Number
| | 02:59 | indicator, the comma, and probably
decrease the decimals at least once.
| | 03:04 | So now we have new values pretty quickly.
| | 03:06 | No formulas in sight.
| | 03:08 | We don't know what the old values are,
unless we wrote them down or copied them,
| | 03:11 | but it certainly doesn't
take very long to do this.
| | 03:13 | I think you can imagine too that even
with many, many cells, of course, this
| | 03:18 | would happen just as quickly.
| | 03:20 | A different situation could be you
have got a huge list of salaries.
| | 03:24 | So the company is going to give everybody
a $500 bonus for the holidays, or whatever.
| | 03:28 | You can imagine adding 500 to all those
salaries very quickly, using this technique.
| | Collapse this transcript |
| Showing all formulas with a single command| 00:00 | Sometime when you are confronted with a
new worksheet or a worksheet you haven't
| | 00:04 | seen, maybe never, or it's been a long
time, you are concerned sometimes with
| | 00:09 | understanding the scope of a worksheet,
trying to figure out what's going on.
| | 00:13 | And one of the things that would be
really useful would be to see the actual
| | 00:17 | formulas instead of the formula results.
| | 00:20 | Now, you would like to be able to do
that on a cell-by-cell basis, but Excel
| | 00:24 | does have a great feature where you can
convert all formulas to actually display
| | 00:30 | them rather than the results.
| | 00:32 | Now, for example, if I happen to click
on a cell here, a very simple formula
| | 00:37 | here in cell B10, you can
see it in the formula bar.
| | 00:40 | But I might want to see other formulas
at the same time, and rather than going
| | 00:45 | to each cell and temporarily turning
it into text, which would be really time
| | 00:49 | consuming, there is a nice fast way to
do this, and there is a great keystroke
| | 00:54 | shortcut for it, but you are
unlikely to know the keystroke shortcut.
| | 00:58 | It's kind of buried.
| | 00:59 | And you will notice and see one or two
characters, and they are usually together
| | 01:04 | on the same key on your keyboard.
| | 01:07 | Usually this key is above the Tab key,
to the left of the number 1 key and
| | 01:12 | below the Escape key.
| | 01:14 | If you hold down Ctrl and hit that key,
the symbol on top is usually called tilde.
| | 01:19 | It's the character that we often see
above the letter N in certain Spanish words.
| | 01:24 | The other character is sort of a
little apostrophe looking character is
| | 01:28 | sometimes referred to as accent
grave, as is used in certain French
| | 01:31 | letters, usually over e.
| | 01:33 | The point is hold down Ctrl and hit
that key, and the worksheet will change
| | 01:38 | substantially in appearance.
| | 01:40 | The most obvious difference is the
column widths have all been doubled, but
| | 01:45 | wherever there were formulas, you see
the actual formula instead of the result.
| | 01:49 | So a quick look at cell B7 here
shows the formula, but not the answer.
| | 01:55 | Now fortunately, this control, whatever
we want to call it, maybe call it Ctrl+Tilde,
| | 01:59 | maybe you call it Ctrl+Accent.
| | 02:01 | Don't use the Shift key.
| | 02:03 | In any case, when you use the same
combination again, it toggles back to
| | 02:07 | the regular display.
| | 02:09 | So think of it as a
toggle button, a toggle switch.
| | 02:12 | Anytime you hit Ctrl with this other
character, you either double the width of
| | 02:16 | all columns and expose formulas,
or you return to the normal view.
| | 02:21 | And when it is in this view, note also
that other cells with values have the
| | 02:26 | values automatically left
aligned, as is the text entries.
| | 02:30 | So it looks a little bit different, but
it certainly does no damage, and better
| | 02:34 | yet, it certainly is of
value to see those formulas.
| | 02:38 | Here is something else you might
consider doing when you're viewing the
| | 02:41 | information like this.
| | 02:42 | I had mentioned that the
columns are twice as wide.
| | 02:45 | Now, here and there that's handy and
helpful, as it might be in Column B, but
| | 02:50 | in Column A it's not.
| | 02:52 | What you might want to consider
doing here is actually printing this.
| | 02:55 | So if you go to Ctrl+F2, that's
a quick way for Print Preview.
| | 02:58 | Ctrl+F2, that may or may
not be what you want to see.
| | 03:02 | I am going to click on this to zoom in,
but if you were looking at this and
| | 03:06 | wanted to print it, don't overlook the
Page Setup option that allows you, on the
| | 03:11 | Sheet tab, to show gridlines, as
well as row and column headings.
| | 03:16 | Now, those are often not checked
and so you don't typically see them.
| | 03:20 | But you can see in the background here
how even though that's not super clear,
| | 03:24 | we are not trying to read it, but the
columns are twice as wide, and we see
| | 03:28 | formulas wherever they appear,
just as we're viewing it on the screen.
| | 03:32 | What you might do to make this a
little bit better, click in the upper left
| | 03:36 | corner, double-click one of the
boundaries between column letters, readjust
| | 03:41 | those column widths again, and
then again, take a look at your Print
| | 03:44 | Preview with Ctrl+F2.
| | 03:46 | You will decide, based on other formulas,
whether that's appropriate or not, but
| | 03:50 | it could serve as a source of documentation.
| | 03:53 | The main point, however, is by choosing
this option of simply hitting Ctrl with
| | 03:59 | that other key, you can quickly switch modes.
| | 04:01 | Now, I had readjusted the column widths,
so we would want to do this again when
| | 04:05 | it's back in normal view again, probably.
| | 04:07 | Click there, double-click here.
| | 04:11 | You can also get to this feature in
the ribbon if you click the Formulas tab,
| | 04:17 | and in the Formula Auditing
group you will see Show Formulas.
| | 04:21 | And as you have noted in Excel 2007, if
you linger over this feature here, the
| | 04:26 | command Show Formulas, you will
see that same keystroke shortcut.
| | 04:30 | Notice how easy it would be to look at
that and just sort of read through it and
| | 04:33 | not have it registered for you.
| | 04:35 | You can barely see that little
symbol out there under Show Formulas, but
| | 04:39 | that's the same feature.
| | 04:40 | I think it's handier with the keystroke
shortcut, but you do have it here as well.
| | 04:44 | It certainly is going to give you
that handle on a worksheet to figure out
| | 04:48 | what's going on, to expose those formulas.
| | Collapse this transcript |
| Highlighting formulas with two clicks| 00:00 | A valuable feature in allowing you to
highlight a worksheet to indicate where
| | 00:05 | formulas are, where constants are, is
certainly valuable and easy to get to in Excel 2007.
| | 00:13 | This worksheet has a lot of formulas in it.
| | 00:15 | It has got a lot of pure values as well.
| | 00:17 | If we would like to select the cells
that have formulas, not really see them,
| | 00:21 | but just select them and
then possibly add a color,
| | 00:24 | that would be valuable, and
of course, the feature is here.
| | 00:27 | On the Home tab of the ribbon, the
extreme rightmost group is referred to as the
| | 00:32 | Editing group, and the very last
button typically is Find & Select.
| | 00:36 | Now, with the active cell anywhere in
your worksheet, but only on a single cell,
| | 00:41 | click this button, Find &
Select, and then click Formulas.
| | 00:46 | All cells that have
formulas are currently highlighted.
| | 00:49 | Now, you can certainly look at that and
in some cases you will remember the ones
| | 00:53 | that are highlighted, but
certainly, in this case, you wouldn't.
| | 00:56 | What you really would want to do
next here would be to add a color to
| | 01:00 | these, just to flag them.
| | 01:01 | Now, it wouldn't necessarily be a color.
| | 01:03 | You can make them be bold or italic
or give them borders, but the most
| | 01:07 | obvious difference we could make to
these, while they are selected, is to
| | 01:10 | change their color.
| | 01:12 | And as fast as any way to do this
would be on the Home tab, in the Font group,
| | 01:17 | the button for Fill Color, click the
drop arrow, pick a color, and as you slide
| | 01:22 | across these, you can review them.
| | 01:24 | Lighter colors typically do
work better. There we go.
| | 01:27 | So, in this case, it's an orange color,
and until we add new formulas, this
| | 01:33 | is totally accurate.
| | 01:35 | All these cells that have
this color, have formulas in them.
| | 01:38 | We didn't change their content in anyway.
| | 01:40 | We just know at a glance.
| | 01:42 | When you're doing worksheet
troubleshooting, you're trying to figure out what's
| | 01:45 | going on, this is helpful.
| | 01:48 | If I were to erase one of these cells
with formulas, here is one that's coming
| | 01:51 | out to be a 0 anyway, but if I delete
this, the color stays, and if we were to
| | 01:57 | do the reverse, if we add a formula
somewhere, it will not turn this color.
| | 02:02 | In other words, we do have to run this
feature again to make it truly be up-to-date.
| | 02:06 | Now, a companion to this could
be equally valuable, or more so.
| | 02:10 | And that's the idea of saying that you
would like to highlight all the cells in
| | 02:14 | this worksheet that just have pure
values in them, and maybe to make it a little
| | 02:19 | bit tighter, just pure numbers, not text.
| | 02:23 | Here it takes a few more steps, and
once again, click on a single cell.
| | 02:27 | If you do happen to have three or
four cells highlighted when you attempt
| | 02:31 | to highlight either formulas or constants,
it only looks within the highlighted range.
| | 02:37 | By clicking on a single cell, even
though it's not obvious, it implies
| | 02:41 | the entire worksheet.
| | 02:43 | This time, we are looking to
highlight the cells that have constants.
| | 02:48 | Once again, on the Home tab, in the
Editing group, we want to choose Find & Select.
| | 02:53 | This time, we want to click on, and it
wouldn't be an obvious choice unless you
| | 02:58 | had explored these options, Go To Special.
| | 03:02 | And this dialog box, which was present
in prior versions of Excel, gives us lots
| | 03:07 | of different choices.
| | 03:09 | At first glance, it might throw you a
little bit, if you clicked the Constants
| | 03:13 | button, you'll notice that the
checkboxes under Formulas are also available.
| | 03:19 | You might have thought that those
boxes are related only to formulas. They're
| | 03:22 | also related to constants.
| | 03:24 | Now, if we simply click OK here, all
cells that have any data but are not
| | 03:30 | formulas would be
automatically highlighted here.
| | 03:33 | What we would want to do here would be
to uncheck the boxes for Text, Logicals,
| | 03:40 | and Errors, leaving only Numbers highlighted.
| | 03:43 | Click OK, and now all the cells
that have pure values are highlighted.
| | 03:49 | And here too, if we wanted to make a
note of this, for a while, we might use that
| | 03:53 | same fill color bucket that we just
used for formulas, and this time pick a
| | 03:58 | different color and make these, say, green.
| | 04:02 | So based on this coloring scheme,
and it's accurate at the moment, like a
| | 04:05 | snapshot in time, the green cells
have constant values in them, the orange
| | 04:12 | cells have formulas.
| | 04:14 | So these two techniques, in particular
the one for highlighting formulas, can be
| | 04:18 | really valuable in scoping out a worksheet and
helping you figure out what's going on a bit faster.
| | Collapse this transcript |
| Simplifying debugging formulas| 00:00 | Occasionally, in Excel, you've got long
formulas and they're not always giving you
| | 00:04 | the answers that you're expecting.
| | 00:06 | So there are two quick
techniques for helping you debug formulas.
| | 00:10 | There are others as well,
but here are two short ones.
| | 00:13 | In cell F2 is a formula involving not
too many other cells, but imagine if it's
| | 00:18 | not quite coming up with
the answer that you expected.
| | 00:21 | You think something is wrong.
| | 00:21 | It doesn't read quite right, not sure.
| | 00:25 | When you edit a formula, and you can do
that by double-clicking in the cell or
| | 00:29 | clicking in the Formula bar,
| | 00:30 | I'm going to double click in cell F2,
what you can do is highlight portions of
| | 00:36 | the formula to see what
that portion evaluates to.
| | 00:39 | For example, if we were to highlight
just these cells here, and we wonder,
| | 00:45 | "What does that equal to?" right now, on the spot?
| | 00:48 | Highlight some data and hit the F9 key.
| | 00:51 | That shows us the value of that.
| | 00:54 | Now, that might or might not
have been revealing, in this case.
| | 00:57 | Maybe if we highlight that and the
portion of the formula to the left of it, E17
| | 01:03 | times that, and we see this.
| | 01:07 | That still might or might not have helped.
| | 01:09 | So you will have to try this with
different components of a formula.
| | 01:13 | Now, you want to be careful when you're
doing this, as soon as that light bulb
| | 01:17 | goes on that says "Oh yeah,
now I've got it figured out,"
| | 01:19 | don't hit Enter here.
| | 01:20 | Hit Escape, because sometimes you're
not really trying to change the formula.
| | 01:26 | You want to give it some thought, maybe.
| | 01:28 | Perhaps it is the wrong cell, or maybe
you've got these in the wrong order somehow.
| | 01:33 | When you're doing this, you might
get a strange message if what you're
| | 01:35 | highlighting, by itself,
doesn't make for a coherent formula.
| | 01:40 | For example, if I were to highlight
these cells here, and you're seeing why that
| | 01:45 | obviously is not a correct formula by itself.
| | 01:48 | Hitting F9 here, that goes off into a
little tangent to tell us something else
| | 01:53 | that really isn't appropriate.
| | 01:54 | So I will just click OK, get out
of there, and consider this again.
| | 01:58 | You certainly can highlight
areas that include parentheses.
| | 02:02 | Maybe this whole part of the formula is
something, maybe, you suspect is a bit off.
| | 02:06 | You might highlight that, hit F9.
| | 02:09 | Once again, does that help, does it not?
| | 02:11 | Maybe include this part of it as well.
| | 02:14 | You also run the risk, occasionally,
when you do this, of highlighting cells
| | 02:18 | where the formula might not be
exactly the same order that Excel is
| | 02:21 | calculating them in.
| | 02:22 | So occasionally, when you do
this, it can be misleading.
| | 02:26 | But keep in mind the idea that
you're just questioning this.
| | 02:29 | If you happen to hit Enter, then do a
quick Undo, if you really didn't want to
| | 02:33 | change it into its values.
| | 02:35 | Normally, though, we just hit Escape.
| | 02:37 | Now, another shortcut that, by itself,
doesn't really debug a formula, but it's
| | 02:42 | going to give you some help.
| | 02:44 | In cell G16 here is a
really, really long formula.
| | 02:49 | And this discussion is not really
about the If function, and so that's not
| | 02:52 | really relevant here, but this is one
of those ridiculously long formulas that
| | 02:57 | you will see sometimes, and I'm
not saying that it's wrong or right.
| | 03:00 | In fact, maybe I shouldn't even have
said it's ridiculous, but it's pretty long.
| | 03:04 | And here's what you can do,
sometimes, that will be really helpful.
| | 03:08 | This function, like we say, it's quite
long, and while editing it, either in
| | 03:13 | the Formula Bar, or if you have double-clicked
in the cell, as I have, you can try the following.
| | 03:18 | In front of the second IF, I'm going
to click right here, and use Alt+Enter.
| | 03:22 | Now, Alt+Enter simply introduces a line break.
| | 03:25 | I'm going to do this in front of the
next IF, and that's an arbitrary choice.
| | 03:30 | You can put it wherever you want, but
I think this would be a logical place.
| | 03:33 | Alt+Enter, click in front of the next
IF, hit Alt+Enter, and in front of this
| | 03:38 | one, and maybe even the first one.
| | 03:41 | Now, I would never make the claim
that you instantly understand everything
| | 03:45 | now, but this certainly structures
the formula in a much more coherent way,
| | 03:50 | and, of course, you would need to know
something about the If function and the And function.
| | 03:55 | But the way this displays
now, it's much more coherent.
| | 03:59 | You've got a much better chance of figuring
out how it might be working or not working.
| | 04:03 | And here too, as another example, you
can highlight portions of this, click F9.
| | 04:08 | That will tell you, in logical
constructions, whether this is true or false.
| | 04:14 | And that helps also in deciphering the
formula and trying to figure out what's going on.
| | 04:19 | But this is a Nested If, and sometimes
these are quite long, and if you didn't
| | 04:23 | write it or if you wrote it a long
time ago, you need something like this to
| | 04:28 | really give you a handle on it and
help you figure out what's going on.
| | 04:31 | Eventually here, I might either
hit Escape or get out of here.
| | 04:34 | And maybe I didn't quite finish that
the right way, so I would do it again.
| | 04:37 | But the point is by doing this you are
not really changing the result, unless, of
| | 04:43 | course, you hit F9 and hit Enter.
| | 04:46 | But by using this capability here,
of using Alt+Enter that is, you can
| | 04:51 | structure this differently.
| | 04:53 | Now, hitting Enter here does not change the
formula in any way, other than its display.
| | 04:58 | If you happen to come back here again,
one downside of this, look in the
| | 05:02 | Formula Bar right now.
| | 05:03 | You don't see this.
| | 05:04 | You don't see all of it
because the equal sign is by itself.
| | 05:08 | Double-clicking lets you see it here, but
how are you going to know that otherwise?
| | 05:13 | You don't always foresee that, unless
perhaps you were the one who has done this.
| | 05:17 | But here is something else you can do.
| | 05:18 | You can make the Formula Bar taller, just
slide onto its bottom edge up there and do that.
| | 05:24 | So that's going to help.
| | 05:25 | You've got more room to edit without
having it overhanging to the worksheet area.
| | 05:30 | So two techniques for helping you figure out
what works in a formula and what doesn't work.
| | Collapse this transcript |
| Creating range names to enhance readability| 00:00 | To make certain kinds of formulas
clearer in what they're doing, and to provide
| | 00:05 | some good worksheet documentation,
giving a cell, or a range of cells, a range
| | 00:10 | name, makes good sense.
| | 00:12 | This formula, in cell C2 here, is
calculating a new salary for the first person here.
| | 00:18 | There is a reference to cell D1, and
it's an absolute reference, so that if this
| | 00:23 | gets copied down the column, it
will constantly refer to cell D1.
| | 00:27 | If we see words here, instead of an
address, it could be a lot clearer.
| | 00:33 | So what might make sense here is to give a
name to cell D1 and then use it in the formula.
| | 00:39 | There are a number of different ways to
name a cell, but many times, a fast way
| | 00:43 | is simply to click on a cell, and this
could, in some cases, be a range of cells,
| | 00:47 | in this case, one cell.
| | 00:49 | Click a cell, and then, in the Name box,
which is located to the left of the
| | 00:53 | Formula Bar, if you just slide over there
it will say Name Box, click the drop arrow.
| | 01:00 | If there are other range names in
this workbook, you will see them here.
| | 01:04 | A range name cannot begin with a number.
| | 01:07 | It cannot have spaces.
| | 01:09 | You might want to use an
underscore to simulate the look of words.
| | 01:12 | You can use upper and lowercase freely.
| | 01:15 | So a name for this cell might be
something like percent increase or pay increase
| | 01:19 | percentage, something like that.
| | 01:21 | You probably don't want it too long.
| | 01:22 | I am going to use Percentincrease, Enter.
| | 01:28 | Once the name is there it then can be
used in a formula, and so in this formula
| | 01:33 | here I'm simply going to double-
click and plug it in right here.
| | 01:37 | Now, it's not that much typing,
I could certainly type it.
| | 01:41 | Another option could be to hit the F3 key
and all range names will be exposed in the box.
| | 01:46 | We could click on that, and click OK.
| | 01:48 | That would put it into place.
| | 01:50 | And the third way, if the cell is nearby,
as it is here, if we simply click on
| | 01:55 | the cell that has the name, or cells, in
some cases, the name pops into place and
| | 02:01 | we can complete this, and then double-
click to copy this down the column, and
| | 02:05 | every single reference
here refers to the range name.
| | 02:07 | Now, that's a lot more descriptive than $D $1.
| | 02:12 | But on the other hand, and this is
certainly a downside that you will see
| | 02:15 | sometimes with range names,
| | 02:17 | the first time you see this you might
not be sure what it means, if you were not
| | 02:21 | the one who has written or created the
name, or maybe it has been a long time
| | 02:25 | since you did create it.
| | 02:26 | If you are not always sure where
that is, at any time you can click this
| | 02:30 | Name Box arrow, and then click on
the Name in question, and it will then
| | 02:36 | take you there, so to speak.
| | 02:37 | It makes that become the active cell.
| | 02:39 | Now, a secondary use of range names
would be in any worksheet at any time.
| | 02:45 | For example, maybe you're at a different
part of a worksheet here and you say,
| | 02:48 | "I want to get to that location," you
can click that box, click the name in
| | 02:53 | question, and it takes you there.
| | 02:55 | So think of it potentially as a go-to vehicle.
| | 02:58 | That's not its main purpose.
| | 03:00 | Now, one clear downside of
range names that I didn't mention.
| | 03:03 | I am remembering a situation of a year
or two ago when someone had sent me a
| | 03:08 | file, and I began to see some range
names, and then I did click that Name Box
| | 03:13 | arrow, and there were a
ton of range names there.
| | 03:16 | It got really annoying.
| | 03:18 | Every time I went to a different kind
of formula, I would see a different range
| | 03:22 | name, so I had to constantly go back
and forth, back and forth, and figure out
| | 03:26 | where they are were and what they meant.
| | 03:28 | Now, you can, in Excel 2007, on the
Formulas tab, click the Name Manager button
| | 03:34 | here, and you will - of course, here
there's only one of them, but you could get
| | 03:38 | the list right here and see them all.
| | 03:40 | That's certainly of value.
| | 03:42 | But when there are many, many of them,
it's going to take you a while to absorb
| | 03:45 | the meaning of the names,
even when they're coherent.
| | 03:48 | Another situation for the data we
see here in Columns F through M is that
| | 03:53 | sometimes you can use
adjacent labels to name cells.
| | 03:57 | If we were to highlight this data
right here, and then use the Create
| | 04:03 | from Selection option.
| | 04:05 | This is in the Define Name's group
that's on the Formulas tab in the ribbon.
| | 04:10 | Create from Selection.
| | 04:12 | We see this option.
| | 04:13 | Now, we don't necessarily need to use
top row and left column both, but if it
| | 04:18 | does see text, it gives us the
options, and suppose we do, in this case.
| | 04:22 | You don't need to use both of these. Click OK.
| | 04:25 | By doing this, what we are about to say
is that January, for example, is now a
| | 04:30 | range name that refers to cells G2 through M2.
| | 04:35 | That's the 365, the 557, and so on, all
the way over to 241, and also, TX as an
| | 04:43 | example, Texas, refers to all the
cells from H2 down to cells H13.
| | 04:49 | So we are talking about the 557, the 786,
and so on, reading downward into the 2095.
| | 04:57 | We have just created a lot of range
names, and now, anywhere in this workbook,
| | 05:02 | or in any formula that's linked to this
workbook, we could be using formulas here and there.
| | 05:07 | For example, someone wants to know the average.
| | 05:09 | Now, this is going to be a little bit
more powerful if it's in a nonadjacent
| | 05:12 | location, maybe on another sheet or a
different part of this worksheet, but if
| | 05:17 | we wanted to know the average Texas
values here, we could just type in TX.
| | 05:19 | It doesn't have to be capitalized,
forget the right parenthesis, just hit Enter,
| | 05:24 | and there is that average right there.
| | 05:27 | We could quickly verify this by
highlighting these cells here and then looking
| | 05:32 | in our Status bar, where
it says the average is 1010.
| | 05:34 | Well, that's the rounded version
of what we are seeing right here.
| | 05:38 | So that's a good on screen verifier.
| | 05:40 | So at different times we can use these
labels here in formulas, and in all cases
| | 05:47 | they will mean respectively,
| | 05:48 | for example, that's what Ohio means,
or OH means as we use it in formulas and
| | 05:53 | functions, and this is what April
means as we use it as well, and we can use
| | 05:58 | that throughout the workbook or in any
formula that's linked to this workbook.
| | 06:03 | So I think you can see here, pretty
clearly, that range names certainly have their
| | 06:06 | place, and we have a nice quick method
of creating them, in cases like the grid
| | 06:11 | we see here, and in the previous
example, a way to make certain formulas more
| | 06:16 | understandable or more
readable at a quick glance.
| | Collapse this transcript |
|
|
2. Excel FunctionsUnderstanding and using basic Excel functions| 00:00 | One of the first things most of us learn
as we learn Excel is how to write formulas.
| | 00:06 | And let's face it.
| | 00:07 | For many of us, that's the
focus of our use of Excel.
| | 00:10 | And shortly thereafter, most of us
also need to confront the fact that some
| | 00:14 | of the formulas we need are either too
complex, or we just don't know how to do them.
| | 00:19 | And it's not to say that we always turn
toward functions, but a function, which
| | 00:24 | you could describe as a shortcut for a
formula, is going to help us in many,
| | 00:29 | many situations to
tabulate information in Excel.
| | 00:33 | And to get a handle on what kinds
of functions there are and what their
| | 00:37 | capabilities are, the best place to
start, in Excel is in the ribbon, to
| | 00:42 | click the Formulas tab.
| | 00:44 | Now, that, by itself, doesn't tell us a
whole lot, but the Function Library does
| | 00:50 | point out to us that we've got Financial,
Logical, Text, Date & Time functions.
| | 00:56 | This can be a little bit intimidating,
because there are many, many, in fact
| | 01:00 | over 300 built-in functions in Excel.
| | 01:03 | Let's backtrack a little bit here.
| | 01:05 | There are many times in Excel
when we simply write little formulas.
| | 01:09 | For example, difference between sales and
expenses, that's going to be our profit.
| | 01:12 | So equal sales, minus the
expenses, that's our profit.
| | 01:20 | We can certainly tabulate data
in other respects with formulas.
| | 01:23 | We could add up this information here.
| | 01:25 | But even when we're adding only four cells,
most of us will not simply add the data this way.
| | 01:32 | One of the first things we learned in
discussing formulas is that whenever we're
| | 01:37 | adding up data, particularly if it's
more than two or three cells, we invariably
| | 01:41 | turn toward a function called Sum.
| | 01:44 | Now, there is a button, of course, we
can use for that, but we can also type in
| | 01:48 | the name of the function.
| | 01:50 | In Excel, every time you type the =
sign followed by a single letter, you will
| | 01:56 | get a list of all of those functions
that happen to begin with that same letter.
| | 02:03 | If you have used a function before and
you're about to type it - now I don't
| | 02:07 | really want to use STANDARDIZE here, but
if I wanted to here, or if I were about
| | 02:10 | to type it, I might just click right
here, hit the Tab key, and it would pop
| | 02:15 | into place right there.
| | 02:16 | Now, I'm not going to use that now, and
you can guess by the pop-ups that appear
| | 02:21 | below this, the hints, as to what this
function refers to, but it is a help here
| | 02:26 | and there when you're using
functions and you prefer to type them.
| | 02:29 | We're going to show you in, a bit, a
different way to get to functions, but typing
| | 02:34 | in the name of the function sometimes is
fast, it's easy, and if you're familiar
| | 02:38 | with what a function does, there is not
much doubt about what you need to enter.
| | 02:43 | Now, going back to the list in the
Formulas tab. There will be times when you're
| | 02:48 | just exploring a little bit.
| | 02:49 | You're trying to figure out whether
there's a function for this feature or that,
| | 02:53 | and sometimes simply by clicking one of
these arrows, for example, the one for
| | 02:56 | Math & Trig, you're going to discover
that yes, there is a function that you
| | 03:01 | were looking for, and it is in this category.
| | 03:03 | It's been a long time since I've used
Factorial and I haven't really used it
| | 03:07 | much in Excel, but there it is,
and I see that that might be handy for the
| | 03:11 | application I'm looking for.
| | 03:13 | And you might see some others.
| | 03:16 | What I'm doing here is almost like browsing.
| | 03:19 | Most of us don't have the
time to do that sort of thing.
| | 03:22 | You might occasionally.
| | 03:24 | And keep in mind also that if you're
of a mindset that says "Gee, I'll never
| | 03:30 | "master Excel. There's so much in here,"
The next thing you know you have got to
| | 03:34 | learn how to use Inverse Hyperbolic Cosine, I
think most of you won't need that. I don't need it.
| | 03:39 | A lot of you won't either.
| | 03:41 | You're not going to worry about it, I'm sure.
| | 03:42 | But do be aware of this, because it
is going to make you aware of some
| | 03:46 | functions just by seeing their names,
and here and there you are going to
| | 03:50 | recognize that sometimes, even though
you didn't check for sure here, if you
| | 03:56 | were looking for a function,
| | 03:57 | now, I'm not seeing Median here, but
I'll bet there's a Median in Excel.
| | 04:01 | Can you imagine yourself saying that?
| | 04:03 | If you don't see it here, at least in
the initial set of categories, check more
| | 04:07 | functions, perhaps
that's a Statistical function.
| | 04:11 | And sure enough, you will find Median there.
| | 04:14 | And if you're about to use it, no
doubt you have some sense of what it's
| | 04:18 | about to do for you.
| | 04:20 | So the question might be, from time to
time, "In addition to what's out there, how
| | 04:24 | "can I get help using a function?"
| | 04:27 | Now, here's some data set up here over in
Column N, involving information about a loan.
| | 04:34 | You want to borrow $26,000, paid off over 48
months, four years, and it's got 6% interest.
| | 04:41 | And you've heard that there
is a way to do this in Excel.
| | 04:44 | Now, if you do know the formula for
doing this, more power to you, and by the
| | 04:49 | way, you will have to raise a number to the
-48th power to get to that. Let's face it.
| | 04:54 | Most of us will not use a formula here.
| | 04:57 | We will use a function, and by me
telling you that there is a function.
| | 05:02 | You'll be able to find it.
| | 05:03 | Sometimes you'll be guessing. "What kind
of a function are we talking about here?"
| | 05:07 | It's probably a financial
function. We can click this.
| | 05:11 | Now, another approach, and more in sync with
prior versions of Excel, is to use the fx button.
| | 05:18 | It's on the left side of the
Formula Bar, and it means Insert Function.
| | 05:22 | Sometimes you'll go here.
| | 05:24 | Now, this gives us overlapping
capability with some of the buttons we just saw
| | 05:29 | on the Formulas tab.
| | 05:30 | So here's one approach.
| | 05:32 | First of all, when you come to this
dialog box, here is the complete list of all
| | 05:38 | functions, alphabetical, the entire list.
| | 05:41 | If you're trying to get to a function
that's been a while, but you know its
| | 05:45 | name, for example, maybe it's Percentile.
| | 05:47 | Hit the letter P here.
| | 05:48 | Once you click in here, hit the letter
P. Well, is it in here? There it is.
| | 05:53 | It's right there.
| | 05:54 | Now, sometimes you'll make a wrong guess.
| | 05:56 | It's not in Statistical.
| | 05:57 | Maybe it's in another category.
| | 05:59 | But by choosing All, you'll see
everything, depending on what else might be here.
| | 06:04 | That's all the functions.
| | 06:05 | So you can certainly track down, or
narrow down a list this way, as well as the
| | 06:09 | way we showed you off the Formula Bar.
| | 06:12 | At other times, you might just
want to type in something here.
| | 06:15 | Maybe you don't know the name of the
function we're about to use here, and
| | 06:19 | what might we type here?
| | 06:20 | How about make a loan
payment or make a monthly payment?
| | 06:23 | Maybe just type loan payment.
| | 06:25 | Is this going to help?
| | 06:27 | Usually, when you do this, what
you get is a pared down list.
| | 06:31 | Now, this might be more than I would
hope, but it's about 15 or so entries.
| | 06:37 | It so happens that it is PMT.
| | 06:40 | I've used it before, perhaps you have
too, and here is a description of it.
| | 06:45 | This may be central to
the way you work with Excel.
| | 06:48 | You may really need this.
| | 06:50 | This describes the various
parameters or arguments in it.
| | 06:55 | If you need more help, and sometimes
you have the time, click Help on this
| | 06:58 | function and the Help
screen will be context sensitive.
| | 07:03 | You can possibly print this
if you wish. You can explore.
| | 07:07 | Sometimes it gives you the
option to show more capabilities here.
| | 07:11 | Sometimes these are very helpful,
at other times, not so helpful.
| | 07:14 | You don't always have the time for that,
but don't overlook that capability.
| | 07:20 | But the other feature, and a strong
one, that Insert Function gives us, and
| | 07:24 | imagine, anytime you're about to use a
function that either you have never used
| | 07:28 | or haven't used in a long time, once
you've recognized the name of the function
| | 07:33 | you want to use, then click OK, and
it will lead us through the steps.
| | 07:38 | So the rate here, and we can either type
it or better yet, in this case, click on
| | 07:41 | the cell that has the value, 6%.
| | 07:45 | Now, you either read the Help screen,
or by deciphering what we're seeing here,
| | 07:50 | you would know that you need to
divide by 12 if it's going to be a monthly
| | 07:53 | payment, 4 if it were quarterly.
| | 07:56 | And then as we click in the next
tab here, you see the description.
| | 08:00 | It's going to be the term 48,
or click the cell in question.
| | 08:04 | I'm not suggesting, in any way, that PMT
is critical to everybody's needs, but
| | 08:08 | this is an example of how the Insert
Function capability does lead us through
| | 08:13 | the steps, helps us figure out what to do.
| | 08:16 | The next selection here is PV, and I think
the description leaves something to be desired.
| | 08:21 | Let's face it, what are you doing?
| | 08:23 | This is how much you're
borrowing. It's the 26,000.
| | 08:26 | There we go.
| | 08:27 | Here's the answer before we even finish.
| | 08:30 | Click OK, and there is the result.
| | 08:33 | If you wanted that to be displayed as
a negative, by the way, you can either
| | 08:36 | change the formula that we actually have here,
| | 08:39 | or put a minus in front of that.
| | 08:40 | But let me double-click on this for
the moment, to suggest that the next time
| | 08:46 | you use PMT, you're probably not going
to use Insert Function button if it's a
| | 08:51 | few days away from this, or if it
starts to become one of those ordinary
| | 08:55 | functions that you use frequently, but
the capability of allowing Excel to lead
| | 09:02 | us through the steps to
build a function is invaluable.
| | 09:04 | But let's not make the mistake of
saying every time you write a function
| | 09:08 | you need to click fx.
| | 09:11 | The more you become familiar with the
function, the less likely you want to use
| | 09:14 | that, and it's certainly isn't fast,
but it does give us that helping hand.
| | 09:19 | If you're relatively new to functions in
Excel, you need those capabilities, and
| | 09:23 | again, we're talking about either using
the fx button, or, as a starting point, on
| | 09:29 | the Formulas tab, clicking one of the
categories here, and then entering the
| | 09:34 | function in this particular way.
| | 09:36 | That takes us into a dialog box that's
similar to, yet not the same, as what we
| | 09:40 | saw with Insert Function.
| | Collapse this transcript |
| Using common functions: SUM, AVERAGE, MAX, and MIN| 00:00 | Any discussion of functions in Excel
invariably begins with the Sum function and
| | 00:05 | often is followed by how to use the
Average function and then, although we can
| | 00:10 | go in different directions certainly, a
few functions like finding the maximum
| | 00:14 | value, the highest value in a range,
the lowest value. That's the normal
| | 00:18 | starting point when we
talk about functions in Excel.
| | 00:21 | Let's just bring out a couple of
ideas about how to use these functions.
| | 00:25 | First of all, the AutoSum
button is a shortcut for typing =Sum.
| | 00:30 | You'll find it on the Home tab, in the
Editing group, and you'll also find it on
| | 00:37 | the Formulas tab in the Function library.
| | 00:39 | You'll see it right here as well.
| | 00:40 | And by the way, you can also
use Alt= to activate that as well.
| | 00:45 | Alt= is the same as
typing or using the Sum button.
| | 00:50 | And many times, you'll learn quickly
too that you can add up data in a column,
| | 00:54 | instead of adding them individually.
| | 00:55 | It saves us a good deal of time.
| | 00:57 | So, a simple example here might be to
click AutoSum and, as is often the case,
| | 01:04 | AutoSum looks for data, both above and to the
left of the cell and tabulates the information.
| | 01:10 | And, we might want to put totals out here
in column Q. That might be a better place,
| | 01:14 | although it certainly
wasn't wrong to put them here.
| | 01:16 | The same idea here and also, notice to
the right, I have already put in the words
| | 01:20 | Average, High and Low.
| | 01:22 | And so a typical usage here might be use
AutoSum, the AutoSum button here, click
| | 01:29 | it, Excel makes a good guess.
| | 01:31 | You might hit Ctrl+Enter here. Then what?
Possibly copy it down the column
| | 01:36 | and double-clicking will
get us there a bit faster.
| | 01:38 | And we might want to do
the same thing with Average.
| | 01:41 | Now, Average doesn't always occur to everybody.
| | 01:44 | when they're relatively new with Excel
and so what some people would do, and it
| | 01:47 | certainly wouldn't be wrong, is to
write a formula, = this total, divided
| | 01:52 | by, in this case, how many states do we
have out there? Seven, to get an answer, and
| | 01:58 | we'll come up with this answer, and then
we could double-click to copy that down.
| | 02:02 | So, Average is certainly
used frequently as well.
| | 02:05 | Now, I am going to undo that, not
that it was wrong, because it wasn't, but
| | 02:10 | you might have overlooked the idea
that you can use, from the AutoSum button
| | 02:17 | because it has a little drop-arrow
or, in this case here, it has other
| | 02:22 | functions we can get to as well.
| | 02:23 | So, we can do Average this way.
| | 02:26 | Now, notice here, though,
that average is a bad guess.
| | 02:30 | We don't want to average the total as
well, but we might want to take this
| | 02:33 | highlighting and slide it leftward,
so that the average truly does do this.
| | 02:38 | And so we'll get the correct answer.
| | 02:41 | Now, interestingly enough, if you have
the Home tab active, AutoSum there has a
| | 02:46 | drop-arrow to the right and you
can get to it there and use Average.
| | 02:51 | Again, Average making that same mistake, so to
speak, of not choosing the data that we want,
| | 02:56 | a little tricky there, to get just that.
| | 02:59 | And there too, we copy this down the column.
| | 03:02 | Now, High I put here purposely, not the
same max, but that's the function we use
| | 03:05 | there too, and we can get to it the same way.
| | 03:07 | We want to know the highest value of
all these cells, and so when we click here,
| | 03:13 | Max is right there too
and the same general idea.
| | 03:15 | The layout style of these tends to be the same.
| | 03:18 | Usually it's the same cluster.
| | 03:20 | And here too, if we don't really
want to include those two, we wouldn't.
| | 03:24 | We want to know the highest value in that range.
| | 03:27 | It's the same general idea.
| | 03:28 | And, of course, here, you would know, this
Min meaning minimum, same general idea here.
| | 03:33 | And here too, we would only
want to include those cells.
| | 03:36 | And a quick copy here by double-
clicking or here and here, double-clicking and
| | 03:42 | then a quick readjustment,
we have got those as well.
| | 03:45 | Now, I am not necessarily suggesting
that everybody's most frequently used
| | 03:49 | function list always includes Max and
Min, but they are easier to get to and
| | 03:53 | they are handy, and it does remind us
that many times, when we are dealing with
| | 03:56 | data, whether it's a small set or a
large amount of data, we frequently need to
| | 04:01 | not only tabulate totals, but also to get
averages to get the highest and to get the lowest.
| | 04:06 | Let's also note something here
too, when we are using AutoSum,
| | 04:11 | that sometimes you might have data in a
column, like this, I am just putting in
| | 04:15 | the number somewhat arbitrarily here.
| | 04:17 | And you might have numbers to
the left of the certain cell.
| | 04:22 | Anytime you click the AutoSum button,
Excel looks, first, upward for data, like here.
| | 04:30 | If it didn't see data looking
upward, it would look leftward.
| | 04:33 | Now, in this case, suppose you really
don't want to add those cells above you and
| | 04:37 | add the ones to the left, well then you
would intervene and go highlight these
| | 04:40 | and you can simply control it
yourself, and roll down here.
| | 04:44 | So be aware of that.
| | 04:44 | And that works the same way when we
are using the other functions as well.
| | 04:48 | So, starting point for most people in
becoming familiar with some functions in
| | 04:52 | Excel would be the four functions of
Sum and Average and then Max and Min.
| | 04:58 | Now, if you are statistician, you are
going to be saying, "I need to do a standard
| | 05:01 | "deviation on these numbers," and
so you probably would pursue that.
| | 05:05 | And it would be a good guess that it
begins with the letter S, but I would
| | 05:08 | advise, well, you decide.
| | 05:10 | If you type = and hit the
letter S, what's likely to be next?
| | 05:15 | The letter T and then you might be a
little bit surprised that there are quite a
| | 05:19 | few variations here.
| | 05:21 | So, probably at this step, if you had
never used these, you'd have to go figure
| | 05:24 | out, which one you might use.
| | 05:26 | But surely that's the kind of function
that a statistician would need to find
| | 05:30 | and for a statistician, this would be
one of those, so-called, basic functions.
| | 05:34 | If you are a mathematician or an engineer,
of course, you've got a different set too.
| | 05:39 | So many different kinds of people use
Excel and so trying to come up with some
| | 05:43 | kind of a master list of functions
that everybody needs isn't always the most
| | 05:47 | obvious thing to do.
| | 05:49 | But at least we have ways, in Excel, of
finding those functions and the examples
| | 05:53 | we have just seen are using some of the more
familiar ones that almost everybody will use.
| | Collapse this transcript |
| Using and extending AutoSum| 00:00 | One of Excel's best shortcuts for
dealing with formulas is the AutoSum button.
| | 00:05 | And invariably, when we need to add up
cells it's more than a couple, and so
| | 00:08 | why not take advantage of this button and
its companion keystroke shortcut, Alt+Equals?
| | 00:12 | Now, in cell G2, we would want to do a
total, say, of the cells to the left.
| | 00:18 | Clicking AutoSum, this is
the typical standard approach.
| | 00:21 | I want to show you a better way.
| | 00:22 | But certainly, there's something of
merit to say, when I use AutoSum I want to
| | 00:25 | know, what it's about to do.
| | 00:27 | So it's a good idea to click the
AutoSum button, check out the visual, and if
| | 00:32 | it makes sense, fine. And then what?
| | 00:34 | Many people will hit Enter. That's fine.
| | 00:35 | You can also click the button again.
| | 00:37 | That brings to mind the shortcut.
| | 00:40 | Instead of pausing each time, as you
have become more comfortable with the
| | 00:43 | function, you know it's
going to work nearly always.
| | 00:46 | So why not just put the active cell in
the appropriate position as here, and
| | 00:51 | simply double-click AutoSum, just fine.
| | 00:54 | If you are using the keystroke shortcut, you
want to hit Alt+Equals and then hit Enter.
| | 00:59 | Same general idea, as you prefer.
| | 01:01 | There are times our hands are on the
keyboard and sometimes that's just a bit faster.
| | 01:05 | A couple of other methods, though, as
to how to use AutoSum most efficiently.
| | 01:08 | For example, in column B, we
have got some numbers right here.
| | 01:12 | Now, if we were to highlight the numbers.
| | 01:14 | We could then click AutoSum once.
| | 01:17 | The total goes below it.
| | 01:18 | A variation on that, not necessarily
better, would be to highlight these cells
| | 01:24 | and the empty cell below it, and
click AutoSum, the total will go there.
| | 01:29 | And in the grid of data down here, you could
imagine wanting to put totals on the right side.
| | 01:34 | One method would be to highlight these
cells, just like this, click AutoSum once.
| | 01:39 | We have got totals on the right.
| | 01:42 | And it would be hardly any better to
say that highlight these would have worked
| | 01:45 | the same way there as well.
| | 01:46 | You only need to hit AutoSum once.
| | 01:49 | And in other situations, maybe just
beneath these, but not to the side, we might
| | 01:55 | want totals right here.
| | 01:56 | Same general idea of course.
| | 01:57 | Click AutoSum once. We are all set.
| | 02:00 | Could we do both there on the bottom as we
just saw or/and on the side? Sure could.
| | 02:06 | If we highlight these cells like this
and click AutoSum, we are going to get
| | 02:10 | totals on the bottom and on the
right-hand side, automatically.
| | 02:14 | And don't overlook this possibility,
as I do undo here, if you really need an
| | 02:19 | average across the bottom and on the
side, hit the drop-arrow to the right of
| | 02:24 | AutoSum as it appears on the
Home tab in the Editing group.
| | 02:27 | Click the drop-arrow, choose Average, and now
we have averages, both below and to the right.
| | 02:32 | So the average is here of
course, as you would expect.
| | 02:35 | Averaging up the cells to the left,
and down here, for example, averaging
| | 02:39 | the cells from above.
| | 02:41 | And that goes for the other functions
that are available off that button as well.
| | 02:45 | So the AutoSum button and/or its
keystroke shortcut Alt+Equals certainly can be
| | 02:50 | used more efficiently than
you might have been using them.
| | 02:52 | It's a great time saver.
| | 02:54 | And keep in mind too that in other
kinds of data, you can use the entire column
| | 02:58 | reference where appropriate.
| | 02:59 | And by the way, here's one quick use
of AutoSum that may disappoint you.
| | 03:04 | This particular set of information here
involves adding up Times here to get the totals.
| | 03:09 | Interestingly enough, if you were to
highlight this data, you will see, in the
| | 03:15 | Status Bar, at the bottom of the
screen, the total. It's 27:38:00.
| | 03:20 | Now, I would like to also show you
where AutoSum doesn't always do what you
| | 03:24 | want, and you could say this is
the fault of another aspect of Excel.
| | 03:27 | But suppose you wanted to total these hours here.
| | 03:30 | If they are highlighted, you can look
at the bottom of the screen and see that
| | 03:34 | they add up to 27:38:00.
| | 03:37 | By the way, it could be minutes and
seconds as well, but it says hours and minutes.
| | 03:40 | Now, if you click on K9 to put in a
total and go to AutoSum, you are obviously
| | 03:45 | going to be a little bit disappointed.
| | 03:48 | You know that isn't the correct answer.
| | 03:50 | Now, the previous answer is 27:38:00.
| | 03:53 | It's kind of a clue as to what's going on here.
| | 03:56 | But the fix isn't nearly so obvious.
| | 03:58 | As you might expect, this is a formatting issue,
and I think it's a bit of a flaw in Excel.
| | 04:04 | If you're adding up hours and minutes,
and they go over 24, you get the remainder.
| | 04:10 | If they go over 48, you'll get the remainder
over 48 hours and so on, in chunks of 24 hours.
| | 04:15 | If you were to right-click here, and format
this, you are on the right path to fixing this.
| | 04:20 | But the solution is not an obvious one.
| | 04:23 | When you come to the Format Cells
dialog box, and go to the Time options, the
| | 04:28 | answer is in here, the choice is
in here, but certainly not obvious.
| | 04:31 | And it's the one that has the 37 in
it, as if we should all know that.
| | 04:34 | As soon as you click OK,
that is a sensible answer.
| | 04:38 | Although in this case it does show
seconds, which we wouldn't want to see.
| | 04:42 | And again, a quick fix
which I could've done earlier.
| | 04:45 | Right-click back into Format Cells.
| | 04:49 | And this time, jump into the Custom variation.
| | 04:51 | It'll take the same display we are
using here, and we want to knock off the
| | 04:56 | seconds and the other characters out there.
| | 04:58 | End that with mm and then we are okay.
| | 05:00 | So that's a bit of an adjustment you'll
have to make when you are dealing with Times.
| | 05:04 | But in all other respects, I think you
can see these various ways of using, not
| | 05:09 | only the AutoSum button, but its
variations in tabulating data and columns and
| | 05:13 | rows and in rectangular ranges, it's certainly a
lot faster than writing functions and formulas.
| | Collapse this transcript |
|
|
3. IF and Related FunctionsExploring IF logical tests and using relational operators| 00:00 | One of the more powerful functions in
Excel, and one that for many people opens
| | 00:04 | the door to more powerful uses of
this software is the function, if.
| | 00:10 | I sometimes refer to this as a
threshold function, because I think it makes you
| | 00:13 | aware of some of the extra power that
Excel has and it makes you think of some
| | 00:17 | of the capabilities of Excel
you might not have suggested.
| | 00:20 | It's programming-like in nature, almost.
| | 00:23 | On the other hand, this
function can be quite simple.
| | 00:25 | The question is how to use it, and when,
and why will this make some sense?
| | 00:30 | Looking at the data on the screen here,
let's imagine that, in this particular
| | 00:33 | organization, that management has
decided to give bonuses to those people who
| | 00:38 | have certain kinds of Job Ratings.
| | 00:40 | And in their scheme of things, a 4 is pretty
good, and 5 is real good, 1 is not so good.
| | 00:46 | And so what they would like be able to
do here is to provide a bonus of let's
| | 00:50 | say $1000 to those people
whose Job Rating is 4 or 5.
| | 00:55 | Another way of saying is using the word,
if, would be, if your Job Rating is 4
| | 01:00 | or 5, you are going to get
$1000, otherwise nothing.
| | 01:05 | The if function begins with the idea of
a logical test, and sometimes a logical
| | 01:10 | test may be simply as we are about to
use here, a test to see if a value is
| | 01:15 | greater than another value.
| | 01:17 | Or expand it a little bit and
you'll see in column H some symbols here.
| | 01:22 | If we want to refer to something, a
cell or a value being greater than another
| | 01:27 | cell or value, we'll use the greater
than symbol, as you see it here in cell H2.
| | 01:33 | Another way of saying this, at
times, is to say >=, and we use these two
| | 01:39 | symbols in this particular order and
never the reverse order, if that's what
| | 01:43 | you are trying to say.
| | 01:45 | Once you have seen those two, the
others here more or less explain themselves.
| | 01:49 | Although this last combination here
looks like a contradiction at first.
| | 01:52 | What do you mean less than, greater than?
| | 01:54 | This is the not equal to
symbol, as used in Excel.
| | 01:58 | And with a smaller zoom factor in place.
| | 02:01 | Sometimes you will see these in formulas.
| | 02:03 | It might throw you at first.
| | 02:04 | It looks like a diamond perhaps.
| | 02:07 | And certainly, at other times,
you will use a simple equals sign.
| | 02:10 | So these are called relational operators
and they're usually at the core of what
| | 02:14 | an if function is all about.
| | 02:17 | The if function typically contains
three parameters or three arguments.
| | 02:23 | We start with a simple test.
| | 02:24 | Now, this is confirmed.
| | 02:26 | If you were to type in the function
here, =if, no reason to capitalize it
| | 02:31 | as with any function.
| | 02:32 | And as soon as you do type in a
function name and then put in the left
| | 02:36 | parenthesis, you get that screen tip.
| | 02:39 | And if you have used the if function
before, the pop-up screen is just a
| | 02:42 | reminder of what you probably already know.
| | 02:44 | We need a logical test here.
| | 02:46 | And so based on the explanation, that
logical test would be for the very first person,
| | 02:51 | if the Job Rating, in this case, E2>3.
This is certainly one way to do this.
| | 02:58 | All the Job Ratings here are whole numbers.
| | 03:00 | So we could say it this way.
| | 03:02 | Other people think it might be clearer to
say >=, in which case, we would use 4.
| | 03:08 | And that is one example of a logical test.
| | 03:11 | Now, again there are lots of possibilities here.
| | 03:14 | You remember this idea that sometimes
you are comparing two cells or a cell
| | 03:19 | with a value, a cell with a formula, a
formula with a value, and all kinds of combinations.
| | 03:25 | Sometimes instead of a value, you might
be comparing this with a text string, in
| | 03:30 | which case it would be
embedded in double quotes.
| | 03:32 | As soon as we click comma here, the
bold print tip below this will change to
| | 03:39 | indicate now we are going to
provide the answer for when this is true.
| | 03:42 | And another way of describing the if
function is simply a function that makes a
| | 03:47 | test and provides us with two answers,
| | 03:50 | one for when the test is
true, one for when it's false.
| | 03:53 | So the answer could be 1000 here.
That's true.
| | 03:57 | When the answer is true that's
the answer, comma, otherwise 0.
| | 04:01 | Answers sometimes are not just
pure values as they are here.
| | 04:05 | Sometimes they are text embedded within quotes.
| | 04:08 | Sometimes a value can be, rather than an
actual value, a cell that contains a value.
| | 04:15 | A formula is also another possible answer here.
| | 04:18 | So if we want to put in text here,
we could put it in double quote.
| | 04:22 | If we want to display nothing rather
than 0, we'll put in another double quote.
| | 04:26 | So we have got a number of options here.
| | 04:29 | I can't think of the
appropriate word to put in here.
| | 04:32 | But maybe we would say Not Today or No Bonus.
| | 04:34 | That's pretty straightforward.
| | 04:36 | Maybe that's rubbing it in.
| | 04:37 | But you can certainly say that, or you can
be a wise guy and put in some other text.
| | 04:42 | And as always, if you have only a
single set of parenthesis in a formula, all
| | 04:45 | you need to do is hit Enter.
| | 04:47 | Now, you may be wondering
why I made the column wider.
| | 04:50 | It's certainly not to contain the
answer, because the answer is going to be
| | 04:52 | relatively short, either 1000 or No Bonus.
| | 04:55 | But in order to display the function more
clearly, I have made the column much wider.
| | 05:00 | Eventually, I would make it narrower.
| | 05:02 | So the result here is No Bonus.
| | 05:04 | And you can see by the Job Rating there.
| | 05:06 | And we might copy this all the way
down the column, or simply drag it across
| | 05:10 | enough cells to make sure
that this is working properly.
| | 05:13 | And you can see what's happening here.
| | 05:15 | And there are many, many times
when the if function is simple,
| | 05:18 | straightforward, just as
it is here. Hit F2 here.
| | 05:21 | We can see it again more clearly.
| | 05:23 | But there are lots of options, lots of
capabilities here as to how we might do this.
| | 05:27 | And we could have rephrased it
in a different way. I don't think it
| | 05:30 | would have been better.
| | 05:31 | But we could have said IF(E2<4,"
No Bonus",1000), phrase it in the
| | 05:39 | opposite direction.
| | 05:40 | Quite a few possibilities here, but
that's the basic layout of the if function.
| | Collapse this transcript |
| Creating and expanding the use of nested IFs| 00:00 | If you have mastered the basic use of
an if function, you eventually come to
| | 00:04 | realize that there are times
when you need to expand it.
| | 00:08 | The simple data that we are seeing
here might be used for someone in
| | 00:11 | organization who is about to get a bonus.
| | 00:14 | And it looks as if everybody in
this organization has that potential.
| | 00:17 | But we are going to structure this in
such a way that we might want to have more
| | 00:21 | than a simple condition
and have just two answers.
| | 00:26 | Sometimes, we need to put together
more than one if, and let's explain what
| | 00:30 | someone might want to do here.
| | 00:32 | We want to provide a bonus for those
people who have a Job Rating of 4 or 5.
| | 00:38 | And if someone has a Job Rating of 3, we want
to give them a bonus, but say a different bonus.
| | 00:44 | And maybe even a bonus for
those who have a Job Rating of 2.
| | 00:48 | Now, if this were a strict mathematical
relationship, we could write a formula
| | 00:52 | that might involve an amount and we
wouldn't even use the if function.
| | 00:55 | But let's structure this in such a way,
and I am trying to on one hand make it
| | 00:59 | not sound too complex.
| | 01:01 | But on the other hand, there are times,
when you need to use some logic that
| | 01:04 | isn't exactly obvious.
| | 01:06 | I'll start off with a simple idea that
we simply want to say if a Job Rating
| | 01:11 | here is >=4, the bonus amount will be 1000.
| | 01:20 | Even though you can't intervene and
watch your function being calculated at the
| | 01:24 | time it's actually being used,
| | 01:26 | there is a way to describe this
logic as if to say it is left to right.
| | 01:31 | If a Job Rating is 4 or 5, 1000 is
the answer and the logic doesn't go any
| | 01:35 | further in the actual function.
| | 01:38 | But what if the Job Rating is a 1, 2, or 3?
| | 01:40 | You could say the logic is waiting
here to be told what to do next, either to
| | 01:45 | provide an answer or
possibly to have another test.
| | 01:49 | And this is what we call a nested if.
| | 01:52 | If a Job Rating is not 4 or 5, then
let's check to see if this Job Rating equals
| | 01:59 | 3, comma, and if it is, let's
give this person $500, comma.
| | 02:07 | But if that's not true, and remember at
the moment we are only looking at those
| | 02:11 | who have a Job Rating of 3, 2, or 1.
| | 02:13 | If it's a 3, these people
will get $500, otherwise nothing.
| | 02:19 | So this is an if, inside of an if, and
you could say if this is the original
| | 02:24 | condition, here is the answer for when it's
true, and here's the answer for when it's false.
| | 02:30 | And the answer for when it's false is
another condition, and there the answer
| | 02:34 | is going to 500 or 0.
| | 02:36 | So that's an if inside of an if, a
nested if, and we need a closing parenthesis
| | 02:41 | for that if, as well as a closing
parenthesis for the original if.
| | 02:47 | We now have three possible answers:
1000, 500, or 0, and we want to copy
| | 02:52 | that into a few cells.
| | 02:54 | And again, I have made the column
wider so we could see this displayed a
| | 02:57 | bit more clearly here.
| | 02:58 | I'll hit F2 to display that first one.
| | 03:00 | Now, you can see what's happening here.
| | 03:03 | An if inside of an if.
| | 03:04 | We have got three possible answers and you
see that playing out in the results here.
| | 03:08 | Now a nested if, and this
counts as one nested if.
| | 03:11 | In all prior versions of Excel, these
prior recent versions, the most nested ifs
| | 03:16 | you could have would be seven.
| | 03:18 | Now, some people's heads might be
swimming already, as they see one nested if,
| | 03:23 | seven sounds like quite a lot.
| | 03:25 | But in Excel 2007, we have
maximum of 64 nested ifs.
| | 03:31 | I can't imagine anybody
even coming close to that.
| | 03:33 | Since we are here, let's
extend this even further.
| | 03:36 | What if this company changes its mind
again, and decides to give a token bonus
| | 03:41 | to those people who have a Job Rating of 2.
| | 03:44 | Once again, if you think of the logic
as left-to-right, we might intervene
| | 03:48 | here, and return to the portion of logic that
says if the B2 value =3, these people get $500.
| | 03:55 | But if not, instead of 0, we'll
insert another if here to check and see if
| | 04:01 | this Job Rating equals 2, comma, and
if it is these people get $100 otherwise,
| | 04:07 | comma, 0.
| | 04:09 | So an if inside of an if, inside of an if.
| | 04:11 | We have got four possible answers.
| | 04:13 | We need another concluding
parenthesis, and you'll note how they're
| | 04:16 | color-coded as well.
| | 04:18 | And when we complete the entries here,
you'll see the different answers out
| | 04:22 | there as before, and it's a longer if.
| | 04:25 | An if inside of an if, inside of an if.
| | 04:26 | Now these are invariably, the
more you have, a bit tricky.
| | 04:31 | And certainly a strong suggestion here would
be either do these in a form called top-down,
| | 04:37 | in other words, this is taking care of
the better Job Ratings first, then the
| | 04:42 | middle one, and then the
less impressive ones let's say.
| | 04:44 | It doesn't make a difference which way we go.
| | 04:47 | If we phrase this in a reverse order, we
could start off by saying if B2=1, then
| | 04:52 | provide 0, and work the other way.
| | 04:55 | But if you start mixing up the logic
going in different directions, you are just
| | 04:58 | asking for comprehension problems.
| | 05:01 | I mean, sure enough, someone could come
along here and say "Well, if this is equal
| | 05:04 | "to 2, then we'll change that to be 100
and if it's not, then we'll check to see
| | 05:08 | "if this is what are we going to check there."
| | 05:11 | You can see how it's going
to confuse your logic a bit.
| | 05:14 | But sometimes these make sense, and I
wouldn't necessarily say this is out of
| | 05:19 | range of most people's capabilities.
| | 05:21 | And you do develop a certain kind of
pride as you work with some of these.
| | 05:24 | But occasionally, on some of these
longer functions, you might come back two
| | 05:28 | weeks later, or two days
later and not know what you did.
| | 05:32 | Kind of think it out all over again.
| | 05:34 | But we do see an example, here, of a
nested if, and I think, in this situation
| | 05:38 | here, it makes perfect sense and there are
times when you need to use this construction.
| | Collapse this transcript |
| Using the AND, OR, and NOT functions with IF to create compound logical tests| 00:00 | The IF function is frequently used
with other functions as well, and using
| | 00:05 | multiple functions together is not
exactly a goal, or shouldn't be a
| | 00:09 | goal, but on the other hand, there are
going to be times when you are trying
| | 00:12 | to use the IF function to achieve more than
just a simple test on a single set of values.
| | 00:18 | Imagine an organization that wants to
provide a bonus for people here, based on
| | 00:21 | their job rating, and on their status
and imagine their rule is simply this:
| | 00:27 | If your job rating is 4 or 5 and you
are Full Time, we are going to give you a
| | 00:31 | bonus of $1000, otherwise not.
| | 00:33 | So a simple IF function would begin =if(.
| | 00:38 | Now, we want to test for two
conditions here, in no particular order, perhaps
| | 00:43 | the job rating first. Is this greater than 3?
| | 00:47 | That's one way to say it.
| | 00:48 | We said 4 or 5, so that that would suffice.
| | 00:50 | Now, another condition here,
and we need to precede this.
| | 00:55 | Now we can type this later,
but why not put it in right now.
| | 00:57 | The word 'and' is actually a function
and, AND, as a function followed by a
| | 01:03 | series of arguments, two
or more, separated by commas.
| | 01:07 | And the word 'and' is inclusive, meaning
this condition must be true and the
| | 01:12 | second one we're about to put in as
well, if this person is to get $1000.
| | 01:16 | So, the second condition here is
that the status here be ="Full Time".
| | 01:23 | Now the entries in the list there
under Full Time with a space, double quote.
| | 01:29 | The upper and lower case is not
critical here, but the space between Full
| | 01:33 | and Time certainly is. Right parenthesis.
| | 01:36 | This is one use of the AND
function as the logical test for an IF.
| | 01:42 | You might be wondering, "Why can't we put
the word 'and' between the two conditions.
| | 01:46 | The reason is that you can
have multiple conditions.
| | 01:50 | We might have a third condition, a
fourth condition, a fifth condition here,
| | 01:53 | separated by commas, and rather than
using the word 'and' over, and over, and over
| | 01:57 | again, we, essentially, put it
in front of the parenthesis.
| | 02:01 | If both of these are true,
comma, the answer is 1000.
| | 02:07 | Otherwise, the answer is zero.
| | 02:10 | And once again, in the situation where you
have got multiple sets of parentheses,
| | 02:14 | they must be entered or typed properly.
| | 02:18 | And we will drag this down a few cells
to check it out and you can see it looks
| | 02:22 | like nobody in this list has these.
| | 02:24 | So, we will change one of these people here to make,
for example, this person, make that be a 4.
| | 02:29 | Actually, a few did turn up there.
| | 02:31 | There we go, a little more clearly.
| | 02:34 | You can see what's happening.
| | 02:35 | As we look at this function here,
recognize that at certain other points, and
| | 02:40 | let's show just for the effect of how
this might be different, we do have a
| | 02:44 | third rule here to have
been here more than ten years.
| | 02:48 | So, the year status here, greater than 10.
| | 02:51 | Now, if you think this out a little bit,
if you have got the combination here,
| | 02:56 | you have actually got eight possibilities.
| | 02:58 | I won't go through all the iterations
but you have three trues, and two trues
| | 03:03 | and a false, and a true and
two falses and so on and so on.
| | 03:05 | That's eight possibilities, and you
have got three entries here, and only when
| | 03:10 | all three of these are true,
does this person get a $1000.
| | 03:15 | The other word that we use frequently,
but certainly not at the same time, but in
| | 03:19 | context, the word 'or' has, as it does in
English, a completely different meaning,
| | 03:25 | and now we're saying if any of them are true.
| | 03:27 | In other words, if the job rating is
good or the status is Full Time, or the
| | 03:31 | years of service is above 10, you get $1000.
| | 03:34 | So, recopying this list here, looks
like everybody wins out here, except the
| | 03:39 | last person in the list, maybe.
| | 03:40 | It depends upon the entries.
| | 03:41 | And once again, you can go through
some of the variations, test this again.
| | 03:46 | This person down here, we
could play with that a little bit.
| | 03:48 | Just for sake of argument here,
we will make this person be Hourly.
| | 03:51 | Again, these little tests you will do
from time to time, just to kind of make
| | 03:54 | sure that it's working okay.
| | 03:55 | We would be doing undo to verify
that that appears to be working as well.
| | 04:01 | So, 'or' and 'and' have a role to play and
there will be times, and it gets a little
| | 04:05 | tricky, where you use
'and's inside of 'or's.
| | 04:09 | Suppose, once again, this organization
changes its mind and says the following.
| | 04:12 | "We are going to give you a bonus here for
one of two major reasons." So here is the 'or'.
| | 04:18 | "The first reason is you
have got a good job rating.
| | 04:21 | "The second reason is if you don't
have a good job rating, we will check to
| | 04:25 | "see if you have got a combination of being
full time and you have enough years of service."
| | 04:31 | So here we will put the word 'and' in
and this is an 'and' inside of an 'or'.
| | 04:37 | If your status is Full Time and your
years of service is this, and one more
| | 04:43 | parenthesis here to match the
green left parenthesis up here.
| | 04:47 | So that's certainly tricky and when
you are doing this yourself and it's your
| | 04:50 | own data, it certainly makes sense, and
yet you have those little doubts until
| | 04:55 | you try this and I am going to
put it in here and recopy it.
| | 04:58 | You can take a look at some of these here.
| | 05:01 | So here and there, you will see
situations that look at first like they
| | 05:04 | should work, not that one.
| | 05:06 | But this person here has a good enough status
but not a good job rating. Has enough years.
| | 05:12 | So, once again, looking at just this
line here, we said if one of two conditions
| | 05:16 | is true, you've got a good job rating.
| | 05:18 | This person doesn't have that.
| | 05:19 | What's the other possibility?
| | 05:21 | A combination of Full Time
and enough years of service.
| | 05:25 | And on this case here, this one
should work and it does. So we see that.
| | 05:32 | Once again, these are the kind of
things that instill a certain amount of
| | 05:36 | pride in tackling these and making
them work and yet a few days later, you
| | 05:40 | come back and look at them.
| | 05:41 | You are not always sure you got it right.
| | 05:43 | So you have to kind of
think of that a little bit.
| | 05:45 | And certainly when it is your own data,
you have got that edge that helps you.
| | 05:48 | But don't overlook these possibilities.
| | 05:51 | A third possibility in all of these is the word 'not'
which I try, pardon the pun, not to use, but
| | 05:57 | you can use this here, and I wouldn't
use in this case really like this, but
| | 06:01 | just to show you that it can be.
| | 06:03 | Sometimes it might be slightly more
efficient to say, "Okay. If it's not the case
| | 06:09 | "that your job rating is greater
than 3, if that's not the case,
| | 06:14 | "we are going to give you
zero here, otherwise 1000."
| | 06:19 | So, that's reverse logic, but
it does give us the answers, here.
| | 06:23 | In other words, the only people who
get bonuses here are those with 4s or
| | 06:26 | 5s, but using the logic this way
invariably seems to be a little more
| | 06:30 | awkward to understand.
| | 06:31 | In some of these, you might see
an older usage of Excel or maybe in
| | 06:36 | formula-intensive worksheet, someone
decide to say well, I will take the most
| | 06:40 | common use and get it out of the way
first, as if there is some time lapse here.
| | 06:44 | But do be aware that you might see
that and it might makes some sense here
| | 06:49 | and there, although I think rarely, to be
used in the same context with an IF function.
| | Collapse this transcript |
|
|
4. Lookup and Reference FunctionsLooking up information with VLOOKUP and HLOOKUP| 00:00 | As you use Excel, situations
invariably arise when we need to look up
| | 00:05 | data, sometimes from information
found on the current worksheet, sometimes
| | 00:09 | on a different worksheet in the same workbook,
and sometimes even from another workbook.
| | 00:13 | There is a category of functions in
Excel referred to as LOOKUP functions and
| | 00:18 | the more common ones are HLOOKUP for Horizontal
and even more common, VLOOKUP, V for Vertical.
| | 00:27 | As we look at the information on this
worksheet here, you could imagine in
| | 00:31 | column G, we might want to calculate a tax rate.
| | 00:34 | Now, if you have mastered the IF
function, and you have worked with it heavily,
| | 00:38 | this might be your starting point.
| | 00:41 | For example, you are looking at the
salary here of the very first person of 41,639.
| | 00:46 | Now, the yellow table to the right,
actually has information in it that is going
| | 00:51 | to give us the answer and most people,
even if they are not familiar with Excel,
| | 00:55 | if they happen to see that table,
would understand it in the following way.
| | 00:59 | They are looking at the value 41,600
and looking in the table, they would
| | 01:04 | realize that if someone has a salary
of 45,000, the tax rate would be 7%, but
| | 01:10 | this person's salary hasn't reached
that level yet, so most people would
| | 01:13 | understand this and read this as 6%.
| | 01:15 | If that table were smaller and the
break points for, say, every 20,000 or
| | 01:20 | something like that and we had only
five or six answers, you could imagine
| | 01:24 | tackling this with an IF
function. And it would work.
| | 01:27 | It would be cumbersome.
| | 01:28 | It would be long, but many, many kinds
of tables, like the one we are seeing here,
| | 01:34 | might contain, for example, 11 answers.
| | 01:37 | That would mean ten nested Ifs.
| | 01:39 | Now, you can do that in the new
version of Excel, but that's really not the
| | 01:42 | best way to get here.
| | 01:44 | And so, when considering how you
structure a table, the table we see here that I
| | 01:49 | am highlighting in columns I
and J, is structured vertically.
| | 01:55 | The key information that we were
looking up and trying to compare with is in
| | 01:59 | column I in the example here.
| | 02:01 | Now, you will notice here to the right
is another table, containing exactly the
| | 02:05 | same information, but
it's structured differently.
| | 02:08 | It's laid out in a horizontal way.
| | 02:11 | I think most people looking at the
layout of these two tables would say well,
| | 02:15 | the table on the left, the vertically
oriented table is a lot more, not only,
| | 02:20 | coherent maybe but it takes up a
lot less space on the Excel screen.
| | 02:24 | It's just the nature of Excel for
information to be structured more easily.
| | 02:28 | It's more readable when you have what
we see in columns I and J, as opposed
| | 02:32 | to the other table.
| | 02:34 | So, based on the information that you
have from the real world that you are
| | 02:38 | trying to put into Excel, more likely
than not, you are going to be creating
| | 02:42 | tables that are verticallyoriented.
| | 02:44 | Now, obviously, there will be other
times when the information just looks
| | 02:48 | better, if it's horizontal.
| | 02:50 | And furthermore, you may already
have a worksheet with a table in it.
| | 02:54 | Maybe you've inherited it from someone
else or you have read it a while ago.
| | 02:57 | It's already got formulas in it,
working off of a horizontal table.
| | 03:00 | Of course, you don't want
to have to redesign that.
| | 03:04 | Now, don't think from the idea that
what you are seeing here that tables only
| | 03:08 | have two columns or two rows.
| | 03:10 | Sometimes tables are quite extensive
and contain many, many columns and rows,
| | 03:15 | and off to the right here is an example
too, where we see a table, and neither of
| | 03:20 | these, of course, is like a real tax
structure. Sometimes we wish it might be.
| | 03:23 | But here is a much, much larger
table where answers are based not only on
| | 03:28 | someone's salary but also
the number of dependents.
| | 03:31 | So tables sometimes are quite large,
and this table, of course, here has many,
| | 03:36 | many potential results.
| | 03:38 | So the discussion about LOOKUP
functions invariably begins with what kind of a
| | 03:43 | table are you going to be using, a
vertically structured table, which is most
| | 03:47 | common, or a horizontal table, and
must it be on the same worksheet? No.
| | 03:52 | Although I would recommend that if you
are setting up the data and testing out
| | 03:56 | various LOOKUP functions, it sure is
handy to have the table information nearby.
| | 04:02 | Later you could move it.
| | 04:03 | It also might be easier and more
proficient to give the table a name, a range
| | 04:08 | name, that's going to make
formulas and functions easier to read.
| | 04:12 | And so the whole discussion of tables
involves, where are you going to put the
| | 04:16 | information and how are you going to structure it?
| | 04:18 | You'll notice both of these examples
here too, and they are identical in content,
| | 04:23 | that table information is in
ascending order in the left column.
| | 04:27 | Now we are going to be showing you how
sometimes, when you use LOOKUPs, you are
| | 04:32 | looking for exact matches.
| | 04:34 | That's not the case here. No one of
these salaries happens to match these.
| | 04:38 | Now certainly, one of them might or could.
| | 04:40 | We are not saying that, but you
certainly wouldn't want to have a table with
| | 04:44 | every possible salary list as here.
| | 04:46 | That would be ridiculous.
| | 04:48 | But any time you are trying to match up
information from a table and you don't
| | 04:52 | have exact entries, and we are
usually talking about numbers that are
| | 04:56 | computational in nature, these
must be in ascending order, as we read
| | 05:01 | downward, and in horizontal tables, the
information must be in ascending order
| | 05:05 | as we read rightward.
| | 05:06 | And that's only in the example of
VLOOKUP, which we'll be seeing the left column,
| | 05:11 | or an HLOOKUP, the top row.
| | 05:14 | The other columns here and the other rows
here are not necessarily in ascending order.
| | 05:20 | The other kind of match involves and
usually it's tax, but not always, any order
| | 05:25 | you want, but sometimes you will be
using the lookups for exact matches.
| | 05:29 | So that's the general idea behind LOOKUP tables.
| | 05:32 | Again, when you are setting them up,
it's a good idea to put them on the same
| | 05:36 | worksheet where you are writing formulas.
| | 05:37 | You can test them more easily and
quickly and then you will decide, based on who
| | 05:41 | might be using them, as to whether they
should stay on that worksheet or possibly
| | 05:45 | you will put them on another worksheet.
| | 05:46 | But all formulas that you have
written relating to tables will translate
| | 05:51 | properly, even if you move the tables to
different sheets or even to different workbooks.
| | Collapse this transcript |
| Using VLOOKUP for approximate matches| 00:01 | In the worksheet we are seeing on
the screen here, in cell G2, we want to
| | 00:05 | calculate the tax rate.
| | 00:07 | But rather than actually calculating it, we
want to look up the information in a tax table.
| | 00:12 | Now, yellow cells to the right comprise the
information of the tax table that we actually need.
| | 00:19 | This might be in a different
worksheet or in a different workbook.
| | 00:23 | But for ease of use and setting up the
example, it's very helpful to have this
| | 00:27 | nearby, at least for a while, as we
are testing a LOOKUP function here.
| | 00:32 | The appropriate LOOKUP function defined
information from this left column will be a VLOOKUP.
| | 00:38 | We are trying to find this
salary's location within here.
| | 00:43 | The logic of VLOOKUP, as used in an
example like this is we are not trying to
| | 00:47 | find an exact match here, but
what's called an approximate match.
| | 00:51 | The logic is simply the way most
people would probably think this out.
| | 00:55 | We are looking at 41,000.
| | 00:57 | We would look down the table until
we find a value that's too large.
| | 01:01 | That would be the 45,000.
| | 01:03 | We revert to the previous row, and
then we are going to indicate that the
| | 01:07 | answers will come out of the
second column of the table.
| | 01:12 | Now, VLOOKUP, by definition, means
look vertically down the left column.
| | 01:18 | The entries in column J, as we see
them in the yellow table there, must be in
| | 01:22 | ascending order as we read downward.
| | 01:25 | And we must cover the low end, not
necessarily the high end, on this case zero,
| | 01:29 | and we would never have a negative salary.
| | 01:31 | So, we are fine there.
| | 01:33 | But do be careful about using VLOOKUPs
and HLOOKUP situations where you have got
| | 01:40 | not all values covered properly.
| | 01:43 | So, we are trying to look at this
value right here, F2, comma, and then we
| | 01:48 | highlight the table.
| | 01:51 | In this case, it's the two columns.
| | 01:54 | We are going to be copying this down
column G. So, we have to be thinking about
| | 01:59 | the absolute reference.
| | 02:01 | We want this reference to stay frozen.
| | 02:03 | So, we can either highlight this.
| | 02:05 | That's just as easy I have done it.
| | 02:07 | Hit the F4 key to make that
an absolute reference, comma.
| | 02:11 | We now indicate what the column
index number is, and you'll see that
| | 02:15 | reference right here.
| | 02:16 | Now, it's literally column K, but
within the table, it's the second column, and
| | 02:22 | that's all we need for an approximate look up.
| | 02:24 | We don't need any other
parameters, just these three.
| | 02:27 | And the answer here, if we
are looking ahead, should be 6%.
| | 02:30 | It is not displayed that way.
| | 02:34 | A quick adjustment there on the Home tab,
the percent button and we won't need
| | 02:39 | any decimal, so that's good enough.
| | 02:41 | Now, nothing wrong with this. Literally,
this will work and of course, in a real
| | 02:45 | life situation, what you should do is
check this out on a few cells, make sure
| | 02:49 | it's making sense, working
properly. It appears to be.
| | 02:53 | If you like greater clarity in the function,
you might consider giving this a range name.
| | 02:58 | You can do this very simply, simply by
highlighting this data, and in the name box that's
| | 03:03 | to the left of the Formula
bar, click the Drop Arrow.
| | 03:07 | Other range names that might be
in this workbook are listed there.
| | 03:11 | Let's call this TaxTable.
| | 03:12 | Range names cannot have spaces.
| | 03:14 | You can use upper and lower case.
They cannot begin with numbers.
| | 03:17 | Other than that, it's pretty free form.
| | 03:19 | By giving this a name, we then have
the opportunity to change our formula
| | 03:25 | and instead of using this, which
again, is not wrong, but it certainly makes
| | 03:30 | the formula a bit awkward, it looks
complicated and so on, simply change this to TaxTable.
| | 03:35 | Now, you can either type this or hit
the F3 key to get a list of them and pull
| | 03:39 | out the one you want that way or
simply highlight the cells in question.
| | 03:46 | Since it has a name, as soon as we
get down to the bottom there, the name
| | 03:48 | automatically pops in.
| | 03:50 | And we could then copy this down to these cells.
| | 03:53 | We would say that we get the exact same
answers and if we wanted to do this for
| | 03:56 | the entire column, just double-click
and it goes all the way down the column.
| | 04:00 | So this function, even though it seems
not to be telling us what it's doing, is
| | 04:04 | very efficient, very powerful and I
would emphasize, again, the idea that the
| | 04:09 | table might be in a different location.
| | 04:11 | If we move the table to a
different worksheet, the formula
| | 04:14 | automatically adjusts.
| | 04:15 | Of course, it could have
been there from the beginning.
| | 04:18 | Same thing applies if we
put this in a different workbook.
| | 04:21 | VLOOKUP, if you don't use it for a while,
you will probably forget how it works.
| | 04:26 | You have to revisit it. An IF function
possibly is more clear in what it does,
| | 04:31 | but it would be
unthinkable in situations like this.
| | 04:34 | To also emphasize the idea that not all
tables are just two columns, scroll to
| | 04:39 | the right here a bit, and you will see
a similar kind of list, but the orange
| | 04:44 | table has many, many columns,
based on the number of dependents.
| | 04:49 | And I want to show you this example,
because sometimes you have got to get a
| | 04:52 | little be creative here.
| | 04:54 | If you'd look at this information for
a bit and you are looking at Claudia
| | 04:57 | Johnson and her salary, you would focus
on the fact that her tax rate is going
| | 05:03 | to come out of this row here for the 55,000.
| | 05:05 | Her salary hasn't reached 60,000. It's 56.6.
| | 05:10 | The answers are going to come out of
here, and when you are looking at her
| | 05:14 | dependents here, it's 2, then you
would be focused on this column right here,
| | 05:19 | and right where they intersect, right there.
| | 05:21 | 10.9% is going to be her tax rate.
| | 05:26 | But the most you would think about this,
the more you would say, "Well how do I
| | 05:29 | "figure out which column it is?"
| | 05:31 | This is not the second column within
this table here and this is the actual
| | 05:36 | table we will be using.
| | 05:38 | Within this table, it's the fourth column.
| | 05:41 | So if someone has two dependents, the
answer is going to come out of the fourth
| | 05:45 | column, and the more you would check
this out back and forth, the more you
| | 05:48 | would realize is that the number of dependents
and the column we need are always off by two.
| | 05:54 | So, if you have two dependents, the
answer will come out of the fourth column.
| | 05:58 | If you have four dependents, it's going
to come out of the sixth column and so on.
| | 06:02 | So, here we have got to use a
VLOOKUP in a more creative way.
| | 06:05 | We are trying to look up this
salary, comma, and here is the table here,
| | 06:12 | these orange cells.
| | 06:14 | A range of cells that has a range
name, the range name will pop in the
| | 06:17 | place automatically.
| | 06:18 | It's called the TaxDep Table, comma.
| | 06:22 | So, which column has the answer?
| | 06:23 | No matter what the dependents are, the
column that's needed here needs to be
| | 06:28 | greater than that by two.
| | 06:30 | So, we will use the reference to the
dependents here, plus 2, and we should get
| | 06:36 | the correct answer here.
| | 06:37 | Remember we are looking for 10.9%. There we go.
| | 06:42 | And simply double-clicking, we should
copy this down the column and of course,
| | 06:45 | you would want to check out a few answers.
| | 06:47 | How about David Christinnelli here, makes 26,000?
| | 06:50 | We would be looking in this row right
here, and David has three dependents, 2.6%.
| | 06:56 | That's what we are seeing here.
| | 06:58 | That's what we are seeing over there.
| | 07:00 | So it does make sense.
| | 07:01 | It does point out, again, though, that
there will be times that you have to come up
| | 07:05 | with your own scheme for figuring out
which column is here, and in this example
| | 07:10 | too, we are talking about an approximate match.
| | 07:13 | It's highly unlikely that any one of these
salaries will match up perfectly with this.
| | 07:17 | Some LOOKUP tables are huge and here
too, based on our previous example, at
| | 07:22 | least when you are setting this up, put
the table nearby and later, as you got
| | 07:27 | more proficient with this, that's
certainly not as necessary, but at least at
| | 07:29 | first, make the tables
be nearby to set these up.
| | 07:33 | So this is an example of a VLOOKUP that
extends the capability into multiple columns.
| | Collapse this transcript |
| Using VLOOKUP for exact matches| 00:01 | When you are trying to lookup
information in a table, sometimes the information
| | 00:05 | that you are focusing on is text-based.
| | 00:08 | Now, in the list that you are seeing on
the screen here, there is a Rate Table on the
| | 00:12 | left-hand side, and this
actually has a range name.
| | 00:14 | The cells I am highlighting here
from A2 to B8 have the collective name
| | 00:18 | RateTable, and you can quickly see
what's going on here, or is about to go on,
| | 00:22 | because something is not working just yet.
| | 00:24 | Each of these ratings here, you will
see their appropriate positioning in the
| | 00:28 | table there, try and
translate them into a numerical score.
| | 00:31 | So maybe this is a time-honored
approach we've used for ratings or changed
| | 00:35 | them into a numerical score, and you can
see that the 99 here for Fair isn't accurate.
| | 00:40 | So, what's going on here, in cell F2?
| | 00:43 | This is using the VLOOKUP function and it
is the function to be using here.
| | 00:47 | We do want to look up information from
the left column of that RateTable over in
| | 00:53 | column A and we are
trying to find the word 'Fair'.
| | 00:57 | But unlike numerical situations, when
you are using text or if you're using
| | 01:02 | numbers on a non-computational way,
say ID numbers, when you are looking up
| | 01:06 | information you need a different approach
here if you're trying to find an exact match.
| | 01:11 | Now unlike a numerical lookup, many
times during which we need to find an
| | 01:16 | approximate location, we need to find
the word 'Fair' over here exactly, and then
| | 01:21 | go get the value 71.
| | 01:22 | Based on what we are seeing
here, this seems to be in place.
| | 01:29 | We do want to take that information, the
word 'Fair', look it up in the left column
| | 01:33 | of the table and when we find it, we do
want to go into the second column to get
| | 01:37 | the answer, but 99 is not the answer.
| | 01:39 | That's the answer you just saw there.
| | 01:41 | For exact matches, we
need a fourth argument here.
| | 01:45 | So following the Column Index number,
that's what's there now, a comma, and what
| | 01:50 | we next put in certainly
doesn't flow out of any innate logic.
| | 01:54 | It's either the number 0 or the
word FALSE, whatever you prefer.
| | 01:58 | I use 0 because it's less typing, but
this is what we do for an exact match.
| | 02:04 | What we're doing with VLOOKUP here is
to say now, when we find this information
| | 02:10 | the word 'Fair' exactly, we go into the
second column and get the answer there.
| | 02:15 | And when we do, as is here, we
get the appropriate score, it's a 71.
| | 02:20 | Then we copy this down the column
to take care of the others as well.
| | 02:23 | Now, not all exact matches, as I said,
involve text but I think probably 90% of them do.
| | 02:29 | The other kind of situation might be if
these are employee ID numbers and maybe
| | 02:34 | they truly are numbers or Social
Security numbers, and need I say that with Social
| | 02:39 | Security numbers we are not
looking for an approximate match.
| | 02:42 | You need to have an exact match with
certain kinds of numerical lookups.
| | 02:46 | But anything that's computationally
based, that's an approximate match.
| | 02:51 | So let's get back to this idea of
these and what are the limitations.
| | 02:54 | First of all, the order
here is not in ascending order.
| | 02:59 | Now it could be, but imagine how
ridiculous this table would look if we put it
| | 03:03 | in alphabetical order.
| | 03:05 | Excellent would be at the top, but
we'd have Very Good at the bottom and of
| | 03:09 | course the order of the list would be crazy
and the numbers would be all over the place.
| | 03:12 | So we wouldn't even consider that here.
| | 03:14 | So the order is irrelevant.
| | 03:16 | Well, irrelevant in the sense that it
can be in any order, alphabetically, but
| | 03:21 | it's a coherent logical order, and of
course, these are in order, descending by the scores.
| | 03:26 | When you are doing an exact match, the
order of the information in the left-hand
| | 03:32 | column is a logical order, not an
alphabetic order or a numerical order, and the
| | 03:38 | fourth argument, the 0 or the word
FALSE, which, by the way, is not in quotes
| | 03:42 | either, will mean we are
trying to find this exactly.
| | 03:45 | So what happens here, when we have
information here that doesn't match?
| | 03:49 | Now here's something that's a little
insidious and you might run into this at
| | 03:52 | different times. I am going to put a
trailing space here, N/A. That's P-o-o-r
| | 03:59 | <Space> and over here what do we have?
| | 04:01 | Well, we are trying to find that information
in the table, and over in the table it's P-o-o-r.
| | 04:07 | That's it. Not a match.
| | 04:08 | If you need to work around this, I
could throw in a quick solution here.
| | 04:12 | You can look at not just E6, but
use the trimmed version of this.
| | 04:17 | This means trim off trailing, leading
and multiple consecutive interspaces,
| | 04:22 | reduce those to 1, and in this case here, we
are looking for the trimmed version of this.
| | 04:28 | Now, in other situations, if you just
happened to have a word that isn't there at
| | 04:32 | all, for example, Kit Carson's
performance here, that's just so-so.
| | 04:37 | Well, that's not in the list,
and of course, this is not found.
| | 04:40 | So I think you can see there is a
distinct set of situations where an exact match
| | 04:46 | is exactly what we want.
| | 04:47 | It's usually text and it works easily and
quickly, but nobody will call this intuitive.
| | 04:52 | You just have to have that fourth
argument, either 0 or FALSE, to signify that
| | 04:56 | this is an exact match.
| | Collapse this transcript |
| Nesting Lookup functions| 00:00 | The more you work with Excel formulas
and functions, the more you encounter the
| | 00:04 | need to use functions together and
sometimes not just tacked onto the end of one
| | 00:09 | another, but actually used within one another.
| | 00:11 | We call this nesting, and perhaps you
have encountered this and you might
| | 00:15 | have needed this as you use the IF function.
| | 00:18 | But sometimes this arises, also,
when using a VLOOKUP function.
| | 00:21 | For example, on the screen here, in
column F, we see various entries and farther
| | 00:26 | to left are people's names.
| | 00:27 | We are trying to look up
the regional tax rate here.
| | 00:31 | First of all, note that there is a
table here in column J and K that lists all
| | 00:36 | of the states and the region
that they happened to be in.
| | 00:39 | First example, here. We'd like to find
out which region Colorado belongs in.
| | 00:43 | You can see here that it's in the
MT, presumably Mountain region, here.
| | 00:46 | So let's do a VLOOKUP here
using the Colorado reference, comma.
| | 00:53 | The table here has a range name. Rather
than highlighting it, which I sometimes can
| | 00:57 | do and you can certainly do that too.
| | 01:00 | this time, I'll hit the F3 key to bring
up the various range names available in
| | 01:05 | this workbook and a range name for
this, as you would guess, is State Regions.
| | 01:09 | We are looking in the left column of
State Regions, comma, and we need to get
| | 01:14 | information out of the second column.
| | 01:16 | It's the 2, and this must be an exact match,
comma, 0 or FALSE, that fourth argument.
| | 01:24 | Complete the entry and we
see that that was found.
| | 01:27 | Once you have indicated which region
Colorado is in, it's the MT region, we then
| | 01:31 | want to use the additional table
that's seen over in columns M through U, and
| | 01:36 | this table over here shows different
rates, depending on a number of dependents.
| | 01:42 | Here are the number of dependents, and
over in the left-hand side, this first
| | 01:45 | person has five dependents.
| | 01:47 | So the result of the VLOOKUP here is an MT.
| | 01:51 | We now want to use MT and lookup the
appropriate MT rate over here, based on the
| | 01:57 | number of dependents.
| | 01:58 | So the answer we got from this first
VLOOKUP is going to be the item to be
| | 02:02 | looked up in an outer VLOOKUP.
| | 02:04 | So think of all this as MT.
| | 02:06 | That's what it evaluates to.
| | 02:08 | Leave that in place and outside of
this, or beginning to the left of it, let's
| | 02:12 | put in another VLOOKUP, the so-
called outer vlookup, left parenthesis.
| | 02:17 | Remember, this is equal to MT.
| | 02:19 | This is what we are trying to look up,
comma, and the table we are using as
| | 02:23 | the source for the lookup are these
cells right here and the range name
| | 02:28 | RegionalTax kicks in.
| | 02:29 | That's the name of that table, comma.
| | 02:32 | We are trying to lookup
information in which column?
| | 02:37 | Well, if a person has five dependents,
it's the 1, 2, 3, 4, 5, 6th column here
| | 02:44 | and rather than putting in 6 we are
going to use that dependent, plus 1, and
| | 02:49 | because this needs to be an exact match,
in other words, we are trying to find
| | 02:53 | that MT exactly here in that left column,
| | 02:56 | we need to put in an additional
argument, comma, and either the word 'FALSE' or
| | 03:02 | the number 0 and a closing parenthesis.
| | 03:04 | All the parentheses must be typed
here, since we have multiple sets.
| | 03:08 | So this should give us the answer and
if you are looking ahead, you would be
| | 03:11 | suspecting in the MT row here in the
column that has the 5 in it, a .30 for this
| | 03:16 | regional tax, and there it is.
| | 03:20 | So a VLOOKUP, inside of a VLOOKUP and,
in this case, you can see the power of it
| | 03:24 | and how it solves the need
pretty quickly and efficiently.
| | Collapse this transcript |
| Finding table-like information within a function with CHOOSE| 00:01 | Despite the power of Lookup functions,
there are going to be times when the
| | 00:04 | information you might want to lookup might be
more conveniently stored within a function itself.
| | 00:11 | Now, a completely different function
called Choose works in some respects like
| | 00:15 | the Lookup functions, but it
doesn't require an external table.
| | 00:19 | A lot of you know that given date
information, you can easily extract the
| | 00:24 | month of a given date.
| | 00:25 | For example =month, referring to
this cell right here, you would expect,
| | 00:31 | because that's March.
| | 00:32 | That's the third month and that's
the answer we get here. It's a 3.
| | 00:36 | Now, armed with that information, you
might say "Well, a table the way we see in
| | 00:41 | "columns D, E and F here would be ideal."
| | 00:43 | We could put that up over on the side
and then we could lookup month 3 and see
| | 00:47 | that it's in the first quarter, because
we are trying to extract or figure out
| | 00:50 | what the quarter is here.
| | 00:52 | Those of you who have a strong
mathematical background are probably thinking,
| | 00:55 | "Well, why do all this?
| | 00:57 | "Why don't we just do something like
figure out what the month is, and do some
| | 01:00 | "division, maybe use the Mod function,
some other things and come up with a
| | 01:03 | "mathematical solution here."
| | 01:05 | Well that might be okay too,
if you were inclined that way.
| | 01:08 | But think of how that might be a bit
more difficult if the quarters aren't
| | 01:12 | the standard quarters.
| | 01:13 | Sometimes fiscal years, like in a
federal government, begin in October.
| | 01:17 | Let's ignore that for the moment
and get back to this issue, though.
| | 01:20 | Rather than having an external table
here, the Choose function allows us to
| | 01:25 | effectively store the
answers in the function itself.
| | 01:28 | Now, the possible answers here,
there are really only 12 situations.
| | 01:33 | We have got 12 possible months.
| | 01:34 | So what we are trying to store, in
effect, would be the results or the numbers
| | 01:38 | that we are seeing in column F, over here.
| | 01:42 | And so, starting with this, we are using
month as a starting point. What we want
| | 01:46 | to use is the function called Choose.
| | 01:49 | And Choose begins with some value
that we are trying to lookup, and in this
| | 01:53 | case, it will be the month that we are
pulling out of the date in column A.
| | 01:57 | ,
That's the index number comma.
| | 02:00 | Now, if that happens to be a 1, it's
January, it's going to be in the first
| | 02:04 | ,
quarter 1, comma. If it's February it's still
in the first quarter, another 1, and if
| | 02:09 | it's March, another 1.
| | 02:10 | So you probably get the idea here.
| | 02:13 | If this is April, the value is 4.
| | 02:16 | Then here's the answer when it was a
1, here's the answer when it was 2,
| | 02:20 | February, here is the answer when it
was 3, March, and now we come to April,
| | 02:24 | it's going to be a 2.
| | 02:26 | So we need the same answer for May and
also June, and then moving into the next
| | 02:30 | quarter, three 3s here.
| | 02:32 | And then three 4s and that's it.
| | 02:35 | And because we have nested functions here,
we do need the closing set of parenthesis.
| | 02:40 | So here are the 12 different answers,
and, of course, they differ only in the
| | 02:44 | sense that we have got four unique
entries, but 12 separate answers there,
| | 02:47 | depending upon whether the
month equals 1, 2, 3, etcetera.
| | 02:51 | So there is the result and March is in
the first quarter, and of course I didn't
| | 02:55 | need to make the column wider, but
for display reasons, we want to see this.
| | 02:58 | So double-clicking to fill in the
other formulas here and a quick check here
| | 03:03 | does verify that this is working properly.
| | 03:06 | Now, if for example, you work for the
Federal government, or you have a fiscal
| | 03:09 | year where the quarters line up
differently, then you will adjust this a bit,
| | 03:13 | and you can imagine how that might be.
| | 03:15 | In the Federal government, in a
quick adjustment here, if it's January,
| | 03:19 | February, March, those
are in the second quarter.
| | 03:21 | So we would take out the three 1s
right here and put them at the end,
| | 03:26 | following the 4, comma, 1,
comma, 1, comma 1.
| | 03:31 | Federal Government style recopy, and it's
used in some other organizations as well too.
| | 03:36 | So March is in the second quarter,
November is in the first quarter and we see
| | 03:40 | how this is playing out here.
| | 03:42 | Once again, it's the Choose function.
| | 03:43 | So we have no external table.
| | 03:45 | We essentially have the
table built-in right here.
| | 03:48 | How many entries can you here? Up to 254.
| | 03:51 | In prior versions, it was more like 31.
| | 03:54 | So a potentially powerful feature, I've
used it occasionally with great effect,
| | 03:58 | and it does save you the need
of setting up the external table.
| | Collapse this transcript |
| Locating data with MATCH| 00:00 | Despite the power of the VLOOKUP and
HLOOKUP functions, there will be times when
| | 00:05 | you are trying to look up
information and they just don't work.
| | 00:08 | They can't get the information that you need.
| | 00:11 | On the screen here, I've got a
list of Social Security numbers.
| | 00:15 | For ease of display, I've put the
information on the same worksheet here, in
| | 00:19 | other word, these numbers here.
| | 00:21 | The table that I want to
use is over here to the left.
| | 00:24 | Imagine a more likely scenario would
be this is in a different worksheet,
| | 00:28 | possibly even a different workbook.
| | 00:31 | Now with the VLOOKUP, we can't look up
information unless it's in the left column
| | 00:36 | of a table, and sometimes what we
are trying to do is simply verify the
| | 00:40 | existence of information, and
there too, VLOOKUP is a shortcoming.
| | 00:45 | We don't use VLOOKUP here to see
if information actually exists.
| | 00:50 | So imagine how we might take
information like this to see if this information
| | 00:56 | exists, for example, in column B. Now
again, in a real-life situation, it's
| | 01:01 | more likely that we are doing this, where
this column E information is located elsewhere.
| | 01:05 | So instead of a VLOOKUP here,
let's use a function called Match.
| | 01:08 | Now, match, by itself, doesn't usually
give us everything we need, but in this
| | 01:13 | case, it might, if we're only saying
at the beginning here "Let's see if the
| | 01:18 | "information exists over in column B," and
what is that we're trying to find? This
| | 01:23 | information, right here.
| | 01:24 | Now these are formatted entries,
the real value of this is simply the
| | 01:28 | text string 145-69-6388.
| | 01:31 | No hyphens, and that's the same
kind of information in column B, comma,
| | 01:36 | and wherever possible and appropriate, if it
makes sense, use the entire column reference.
| | 01:41 | So we'll just use column B here.
| | 01:43 | So, the Match function is very similar
in some respects to a VLOOKUP function.
| | 01:48 | There is a lookup value.
| | 01:50 | That's that Social Security number.
| | 01:51 | We are looking in an array.
| | 01:53 | Now this needs to be a column or a
portion of a column, or a row, or part of a row.
| | 01:59 | It's not a two-dimensional range there. Comma.
| | 02:03 | Now, you see what pops up on the screen.
| | 02:05 | We're looking for an exact
match here, and put in a zero.
| | 02:11 | We need to find that, exactly.
| | 02:12 | We want to see if that number exists
there. What kind of an answer are we
| | 02:16 | going to get out of this?
| | 02:17 | The positioning within the column it's
in, because we've used the entire column
| | 02:22 | B, it's in the 17th row and if you look
in the 17th row, you see that right here.
| | 02:27 | That does match up with
what we are trying to find.
| | 02:30 | So the answer isn't complete in one sense.
| | 02:33 | Although, if your sole purpose was to
see do we have this in our list? Yes we do
| | 02:38 | and that's the result.
| | 02:39 | And we see that pretty quickly
and readily with the Match function.
| | 02:43 | Similar in some respects to VLOOKUP,
when you are using an exact match there,
| | 02:46 | that fourth argument that you need
in some VLOOKUP functions is a zero.
| | 02:49 | And here it is, here for an exact match.
| | 02:52 | If you need the other approach words 1
or -1, then the order of the information
| | 02:56 | in the column has to be ascending or descending.
| | 03:00 | Now, there is another use for Match
that might occur in a situation like this,
| | 03:04 | where we've got entries in columns J and
K and the names are in, as you see, last
| | 03:12 | and first name, split out this way.
| | 03:14 | Does Yvonne Randall exist in the list?
| | 03:17 | Well here, for purposes of example, we
see yes and we can find it, but it's a
| | 03:22 | short list you see over there,
but it's in this display order.
| | 03:26 | Now imagine certain kinds of
databases that you might have.
| | 03:30 | You've got thousands of these.
| | 03:32 | Obviously, you need a way to do
it other than just eyeballing it.
| | 03:35 | So what we want to do now is, in
effect, pull these two together in a Match
| | 03:41 | function to see if,
together, that exists over here.
| | 03:46 | And you may or may not be familiar
with how to concatenate, so we'll use that
| | 03:48 | technique here, but we will be using
the Match function to say, in effect, let's
| | 03:54 | see the combination of these.
| | 03:55 | How do we put these together?
| | 03:57 | In order to match up with what we are
seeing in column P, we want to pick up the
| | 04:01 | entry from J2 here, and along with this,
use the ampersand, double quote, comma,
| | 04:07 | Space, double quote.
| | 04:09 | So following the last name, Randall, we
are looking for Randall and a comma space.
| | 04:15 | As you see they are in column P and
along with that last name and comma, space,
| | 04:20 | we also want to see the first name, Yvonne.
| | 04:23 | So this is what we're looking for.
| | 04:25 | Randall, comma, space, Yvonne, comma.
| | 04:29 | So all this is the lookup value.
| | 04:33 | The table here is simply column P again,
like in the entire previous example,
| | 04:38 | the entire column where appropriate.
| | 04:40 | Comma, and we are looking for
an exact match. Zero we're done.
| | 04:47 | And looking ahead there, you see Yvonne
Randall. That's in the 13th row. That's our answer.
| | 04:52 | It's the 13th position in column P.
| | 04:57 | Now, usually you'll use additional
features or possibly use this in a VLOOKUP to
| | 05:03 | find other information, but match, by
itself, simply gives us the position of
| | 05:08 | information in a column or in a row.
| | 05:11 | If Yvonne isn't found here, or maybe
someone spelled Yvonne's name differently
| | 05:16 | here, you're going to get a different
kind of answer, N/A. So this tells us
| | 05:20 | when the information is not found, and
sometimes that's an appropriate use of the function too.
| | 05:25 | We either want to see if it's there or
if it's not, and if it is, it gives us
| | 05:29 | the positioning within the array.
| | 05:31 | If not, it simply says N/A,
couldn't find the information.
| | Collapse this transcript |
| Retrieving information by location with INDEX| 00:01 | As you look at the table of information
in column C through J here, the orange
| | 00:05 | colored cells, these represent
prices based on perhaps packages. This
| | 00:10 | represents the size of the package.
| | 00:12 | Now, a more sophisticated example
might have this broken out by weight, but
| | 00:16 | let's imagine, based on the size of a
package, and where it is to be shipped from
| | 00:21 | a particular location, we've
got different shipping zones here.
| | 00:25 | From the table, we want to be able to
pull out information based on size and zone.
| | 00:31 | A function called Index allows us to
pull out information from a large table, as
| | 00:36 | long as we provide the row and column reference.
| | 00:39 | So let's imagine a simple example here. In
cell D11, we want to see the price of an item
| | 00:45 | that's Size 3 to be shipped to Zone 6. =index.
| | 00:50 | Index begins with the
actual location of the array.
| | 00:55 | Now, there is a range name here.
| | 00:56 | You will see it pop in the
place as I highlight the cells.
| | 00:59 | The range name is ShippingCost, comma.
| | 01:02 | Throughout Excel, you will find
different functions that use row and column,
| | 01:06 | always the row comes first, RC, remember that.
| | 01:10 | It's not always the case that
everything lines up perfectly, but in this
| | 01:14 | particular example, it does.
| | 01:15 | The Size here is 3, and so we can use
this cell right here if we wished. If
| | 01:20 | we were doing it manually, we just type 3, but
let's use the cell right here that has the size.
| | 01:25 | That gives us the row number,
comma, and the column number here.
| | 01:30 | It's the 6th column.
| | 01:31 | That's found right here. That's the Zone.
| | 01:34 | So what's it going to cost?
| | 01:35 | And looking ahead, you can see where the
3 and the 6 intersect this way, $35.29,
| | 01:40 | and that's the answer.
| | 01:43 | So we pulled out information from a
table, based on the row and column number.
| | 01:47 | Now in columns, L, M, N and O
we see a similar need for this.
| | 01:52 | We've got a huge list of items and we
want to know what the shipping cost is,
| | 01:56 | based on the size of the
item in the shipping zone.
| | 02:00 | So once again, the Index function here,
we're looking at this table again.
| | 02:04 | So either type it or highlight it,
comma, and the row number we need here
| | 02:10 | relates to the size.
| | 02:11 | It's going to come out of cell M2,
comma and the shipping zone, it's going to
| | 02:17 | represent the zones here.
| | 02:18 | The column number, that's right here.
| | 02:20 | And we are all done with that, Enter,
and we'll recopy this, and you can see how
| | 02:25 | we've used the Index function in these
examples to pull information out of a
| | 02:29 | table, based on a row and column reference.
| | Collapse this transcript |
| Using MATCH and INDEX together| 00:01 | If you've worked with the Match and
Index functions, I think you recognize
| | 00:04 | that they each have power in their own
right and yet, at times, each one of them
| | 00:08 | doesn't quite complete what we need.
| | 00:10 | And at other times, you are thinking,
"Well, I need to get information out of a
| | 00:13 | "table. Why not VLOOKUP."
| | 00:15 | There are times there, too when
it doesn't quite meet your needs.
| | 00:19 | Let's look at the situation here.
| | 00:20 | There is a table in columns D through I.
Imagine that this, possibly, is on another
| | 00:25 | worksheet, and again, for ease of use,
we'll put this on the same worksheet here,
| | 00:29 | but we want to be able to extract
information from here, based on, for example,
| | 00:34 | April, DVD Drives. Looking ahead, of
course, we'd be looking in here and that's
| | 00:39 | the number we hope to get a hold of.
| | 00:40 | And we can't really come up with a
sensible way to do this with a VLOOKUP,
| | 00:46 | and Match will tell us where this is
within a given range, both for the month
| | 00:50 | and this, but we need to put this
together in pieces perhaps, at least the
| | 00:54 | first time through.
| | 00:55 | So let's show different ways to use
the Match and Index function together.
| | 01:00 | First of all, let's locate April in this
list by simply using the Match function.
| | 01:05 | We are trying to find
April, comma, in this list.
| | 01:09 | We know it's there. We see it, and it's
located, comma, and we'll find out in a
| | 01:15 | moment, of course, we would know ahead of
time. We're looking for an exact match here.
| | 01:19 | The Match function tells us the
relative position of April in this list.
| | 01:24 | It's in the fourth position, pretty
apparent, and we want to do the same kind of
| | 01:28 | thing with disk drives and
we will be looking up here.
| | 01:31 | It's in the first position of the list up there.
| | 01:34 | You see that ahead of time, so a
similar function trying to match DVD Drives,
| | 01:39 | comma, using this range.
| | 01:41 | That's where we're looking and
we need to find an exact match.
| | 01:44 | We put in a zero and we have that information.
| | 01:47 | So with that knowledge in hand, we can
use an Index function now to look at
| | 01:54 | this range of data here. Index gives
us the ability to first define the table
| | 02:01 | we are looking at and we need to get
information out of a certain row here, and
| | 02:05 | it's the fourth row because it's April, but
we see that right here, so we'll refer to this
| | 02:10 | cell here. We'll reposition this in a
second. We'll recreate this using Match inside of
| | 02:15 | Index. For the moment, we're
just picking up the references.
| | 02:17 | So, comma, and the column was derived
from the fact that DVD Drives here, it's
| | 02:22 | actually the third
position and that's all we need.
| | 02:27 | This is the table we're
looking to extract information from.
| | 02:30 | This is the row reference. This is
the column reference. We're done, 4565.
| | 02:35 | We see that information under
April, DVD Drives, right there.
| | 02:40 | Now, as you use these more often and
more often, not everybody, but certainly
| | 02:46 | some of you, will use them with enough
frequency to, in effect, build these as you
| | 02:50 | go and there's no real requirement to
do this. In fact, some people might think
| | 02:54 | it's better to leave the function like this,
but why not, rather than having this here,
| | 03:00 | go back to this function here, highlight
this text here and simply hit Ctrl+C or
| | 03:06 | you can use the Copy button here of the
Home tab right then in there, copy just
| | 03:10 | that part without the equal sign,
hit Escape, come back into here, perhaps
| | 03:15 | double-click or do it in the Formula Bar,
instead of this, let's paste in Ctrl+V
| | 03:20 | or the Paste button that argument,
complete that for the moment, come back here
| | 03:24 | and do the same sort of
thing with this reference?
| | 03:27 | Highlight just that portion of it, copy
it, Escape, come back into the function
| | 03:33 | here, and position this here,
and paste that into there.
| | 03:38 | Now, that may or may not be the ideal solution.
| | 03:41 | It depends upon who is going to be using this.
| | 03:43 | Is it you? Do you use these
frequently? And so on, but using Match and Index
| | 03:47 | together, and perhaps using them
separately, or putting them together the way we
| | 03:52 | see here, there is no
question that it gets us the answer.
| | 03:56 | But I think you might debate with yourself
sometime about, what might be most efficient.
| | 03:59 | But you see how we can use the two
together to get information out of this table.
| | 04:04 | Now, there is another set of
information off to the right here, in columns K, L,
| | 04:08 | M, and let's imagine too that that
information is located in one worksheet and in
| | 04:15 | another location, perhaps
another workbook, another worksheet,
| | 04:18 | we need to find the person's name here.
| | 04:21 | Here is the Social Security number.
| | 04:23 | Now, once again, first thought might be VLOOKUP.
| | 04:27 | We are trying to lookup this information.
| | 04:30 | But VLOOKUP requires that we look up
information in the left column of a table
| | 04:35 | and there is no possibility
with VLOOKUP to then look leftward.
| | 04:39 | First thought might be, "Why don't you just
move the table columns around a little bit?"
| | 04:43 | Let's imagine that this is in a
worksheet and other formulas are already created,
| | 04:48 | or maybe this is in a different
workbook that you can only use to extract
| | 04:52 | information from, let's say that this
arrangement is there, it's cast in stone
| | 04:57 | as we say, you cannot change it.
| | 04:59 | We need to find out not only that
this exists but we need to find out the
| | 05:02 | name of this person.
| | 05:04 | So the first approach here would be to
use the Match function to see where it
| | 05:08 | appears in column M, =match, left parenthesis.
| | 05:13 | We looking at this value, comma, we
are looking at column M and we need to
| | 05:18 | find an exact match, comma, zero, and
that's found in the 12th positioning.
| | 05:24 | There it is right there.
| | 05:25 | We see it ahead of time.
| | 05:27 | Now once we found that, we now want to
use that as the row reference in an Index.
| | 05:32 | So leaving this here in place, let's use Index.
| | 05:37 | Now, where are we looking here?
| | 05:39 | We actually need to only look in
column K. Now, column K and column M are in
| | 05:45 | sync with each other in the sense that they
are parallel, comma. In this table in
| | 05:49 | column K, we need to get
information out of which row?
| | 05:53 | It's going to be the 12th row and we already
know the row from here, so that's in place.
| | 05:59 | Now, since it's only a single column, we don't
even need to put in a column reference.
| | 06:05 | If we did have a situation where this had to
come out of a different column, we'd put that in.
| | 06:08 | We don't need that here.
| | 06:10 | We do need the right parenthesis and
by hitting Enter, we've got the name.
| | 06:14 | There is Thomas Watson.
| | 06:16 | And so this will work for
the other entries as well.
| | 06:18 | Simply double-click and
they all fall into place.
| | 06:22 | So sometimes you'll use an Index and
Match, using this approach, which is
| | 06:26 | certainly more direct than our
previous example, but you get the idea of how
| | 06:30 | Match and Index frequently are used
together to circumvent some of the
| | 06:35 | limitations of VLOOKUP.
| | Collapse this transcript |
|
|
5. Power FunctionsTabulating information on a single criterion with COUNTIF, SUMIF, and AVERAGEIF| 00:01 | Whenever you have database-like data
that you are managing in an Excel list,
| | 00:04 | invariably, you need to tabulate some
information, some sub-totals, some grand
| | 00:09 | totals, and there are tons
of ways to do this in Excel.
| | 00:12 | Sometimes a PivotTable is the best
solution, sometimes it's a new column of
| | 00:16 | data, sometimes you just want a set of
statistics, maybe off to the right of your list.
| | 00:20 | There are three related
functions that might come into play here.
| | 00:24 | One of them is brand new in Excel 2007.
| | 00:28 | Sometimes, just looking at the
data, an idle question comes up.
| | 00:31 | For example, there's a list here and
quite a few names, see the status of
| | 00:34 | people, salary, and someone just
says out of the blue, "How many full time
| | 00:39 | "people do we have here?"
| | 00:40 | So, what we would like to be able to do
is simply count the number of times that
| | 00:44 | we see that phrase, Full Time, in
column B, and column B might have a ton of
| | 00:49 | entries or maybe just a few.
| | 00:50 | It doesn't make any difference.
| | 00:52 | The function we are talking about here,
first of all, is called COUNTIF and as
| | 00:56 | always, if where we are looking is in a
column where there's nothing else, let's
| | 01:00 | refer to the entire column, make it simpler.
| | 01:02 | We are looking in column B,
and what are we looking for here?
| | 01:04 | Well, one way to approach this is simply
within double quotes to put in the text entry.
| | 01:09 | Now sometimes you might be looking for
values and you can simply enter the value
| | 01:13 | to see how many times that occurs.
| | 01:15 | We'll type Full Time.
| | 01:17 | By the way, the uppercase here isn't
critical, but logically, you would type it
| | 01:20 | this way, because you see
that's the way it's entered.
| | 01:23 | The space is critical, of course.
| | 01:25 | Full Time, double quote. That's it.
| | 01:28 | How often does Full Time
appear in column because?
| | 01:31 | And there it is, 162 times.
| | 01:34 | Now, if you'd like to do this for the
other kinds of statuses that appear in
| | 01:37 | column B, the list off to the right,
which is prepared ahead of time, we can
| | 01:42 | simply convert to that.
| | 01:43 | And although it doesn't really have to
be in the same row, I'll just drag this
| | 01:46 | up here and change this entry here.
| | 01:49 | Instead of referring to the text entry,
we'll make it refer to the cell right
| | 01:52 | here, and we would get a similar answer,
and now we can simply drag this down
| | 01:56 | three more cells to get
our totals for the other.
| | 02:00 | And that total is 296, and
you'll see that down in the status bar.
| | 02:05 | If you were to click on column B, as
I'm doing right now, you might not see
| | 02:09 | anything in that status bar, but if
you were to right-click down there, you
| | 02:12 | can certainly control,
| | 02:13 | and this might be a reason for having
this around all the time, do a count of
| | 02:17 | the cells that have entries in them,
and you see they are popping up already.
| | 02:21 | And as soon as I click outside of
this, you'll see 297 entries there.
| | 02:25 | Of course, that's counting B1 also,
so that accounts for the difference.
| | 02:29 | But getting back to the idea of
COUNTIF. That's fast, that's easy, and when
| | 02:33 | you're referring to a list, perhaps it's clearer.
| | 02:35 | It depends upon what your needs are.
| | 02:37 | Let me point out a variation on this too.
| | 02:39 | Although this isn't a powerful use of it,
but I think you can sense how it could be.
| | 02:43 | You can use wildcards here.
| | 02:45 | Let's show how, in a function,
COUNTIF, looking again in column B, we
| | 02:51 | want to find all the people who are
full-time or half-time, either way.
| | 02:55 | So, what they both have in
common, of course, is the word 'time'.
| | 02:58 | In this situation, we use a
double quote and the asterisk.
| | 03:01 | That's a commonly used wildcard, which you
perhaps have seen before and then the word 'time'.
| | 03:08 | Anytime, in column B, where we see the
word 'time' preceded by anything, we want to
| | 03:13 | know how many times this has occurred.
| | 03:15 | It's 198 and, of course, that's
the total as we see up here.
| | 03:18 | We were to highlight those two cells.
| | 03:19 | It's the total of the full
-time and the half-time.
| | 03:22 | So, be alert to that possibility as well.
| | 03:25 | Now, the long time, I used to call
it companion to COUNTIF is SUMIF.
| | 03:29 | SUMIF begins and starts
essentially the same way.
| | 03:34 | Let's say, again, we would like to
know not only how many full time people we
| | 03:39 | have here, but what are their total salaries?
| | 03:41 | SUMIF has a third argument.
| | 03:45 | It starts off in
essentially the same way as COUNTIF.
| | 03:48 | We're looking in column B, comma, and I will
use the cell reference G1, which has the
| | 03:54 | word Full Time in it.
| | 03:56 | And every time we find an entry here,
that's Full Time, we would like to get the
| | 04:01 | Salary and the word sum, of course,
suggests we want to be adding them, so we
| | 04:04 | are going to get the salaries out of Column C.
| | 04:07 | In situations where you are
highlighting cells, for example, if we were to
| | 04:11 | choose to do this by B2:B300 or
something like that, you would want the C
| | 04:16 | reference to match that
exactly to avoid problems.
| | 04:20 | If this says B2 to B300, then over here
at Column C, you would indicate C2:C300.
| | 04:27 | So, how much are we
paying these full-time people?
| | 04:29 | A quick fix here, there.
| | 04:32 | It's 8,847,265 and based on that, of
course, you'd imagine wanting to know
| | 04:37 | Half-Time, Contract, Hourly.
| | 04:39 | We'll just drag this down here, and
we see the total there, 15.09 million.
| | 04:43 | Click on column C. That's the same
total, and we are seeing that in the
| | 04:46 | Status bar as well.
| | 04:47 | So, that's a cross verification, you might say.
| | 04:50 | Now in all prior versions of Excel, if
you wanted to get an average salary, you would
| | 04:55 | just take an entry, like this,
and then divide it by the count.
| | 04:59 | So, we possibly could put the two together.
| | 05:01 | That wouldn't be that outrageous or difficult.
| | 05:02 | We could take this and then divide it by
the COUNTIF that we used up above here.
| | 05:07 | But there is a new variation, a new function in
Excel 2007, called AVERAGEIF. Left parenthesis.
| | 05:15 | What are we looking here?
| | 05:16 | Like before, we are looking in column B, comma.
We're looking for the Full Time people.
| | 05:21 | We'll just pick up the information from
G1 like before, comma and we're looking
| | 05:26 | at the salaries in column C. What's the average
salary of the Full Time people? And there it is.
| | 05:33 | And we can quickly verify this too by
writing a simple formula here, equals,
| | 05:37 | whatever we got earlier with the SUMIF
for the Full Time people, divided by the
| | 05:42 | COUNTIF of the Full Time people,
and we have the same information.
| | 05:46 | Obviously a rounding difference on the
display, but it is the same information.
| | 05:50 | So AVERAGEIF, which is a new function
in Excel 2007, will simply make this
| | 05:55 | process simpler and more direct.
| | 05:57 | And as in the previous situation,
if we wanted to get the average for
| | 06:00 | Half-Time, Contract, and Hourly, just
drag this down three more cells and we
| | 06:04 | have those as well.
| | 06:06 | So SUMIF, COUNTIF, and AVERAGEIF,
great features for tabulating information
| | 06:12 | from a list of data.
| | Collapse this transcript |
| Tabulating information on multiple criteria with COUNTIFS, SUMIFS, and AVERAGEIFS| 00:01 | In versions of Excel prior to 2007, if
you were trying to tabulate information
| | 00:06 | from a database based on multiple
criteria, you might need to be more
| | 00:11 | knowledgeable about, and you need to
learn about, how to use what are called Array
| | 00:15 | formulas or Array functions.
| | 00:17 | In Excel 2007, are three new functions:
COUNTIFS, SUMIFS and AVERAGEIFS, and, of
| | 00:26 | course, they have a relationship
with SUMIF, COUNTIF, and AVERAGEIF.
| | 00:31 | They allow us to tabulate
information based on multiple criteria.
| | 00:35 | There's a formula in F2 here, function, COUNTIF.
| | 00:38 | It simply tabulates the
number of full time people here.
| | 00:42 | Now an extended idea, based on that bit
of information, is how many of these full
| | 00:47 | time people have a job rating of 5, and
rather than working off of this, just use
| | 00:52 | the new function, New in Excel 2007,
called COUNTIFS, and we're looking at two
| | 00:59 | criteria here, the status and the job rating.
| | 01:02 | So you'll notice in the popup
here, it's says criteria_range1.
| | 01:05 | We're looking in column B, comma, and we
are trying to narrow this down by
| | 01:10 | criteria1, criterion.
| | 01:12 | We are using singular, Full-Time, comma,
and notice how another set has come up.
| | 01:21 | So these can be in pairs,
and we can have many of them.
| | 01:23 | We're only going to have two pairs here,
but notice how we're starting off here.
| | 01:27 | criteria_range1, criteria1 and now
criteria_range2 will be job rating,
| | 01:37 | comma, and since this is a value and not text,
we don't need to put this in double quotes.
| | 01:42 | Just simply the value 5.
| | 01:44 | Now if we had more columns next to
the A, B, C, D there, we could be doing
| | 01:49 | this for even more sets.
| | 01:50 | We got two sets here.
| | 01:51 | This is the first set.
| | 01:53 | We are looking in column B to see who
is full-time, and in column C to see who
| | 01:57 | has the job rating of 5, so how may
people fall into this category here?
| | 02:01 | So 32 of those 162
people have a job rating of 5.
| | 02:05 | Now SUMIFS and COUNTIFS work in a
similar fashion but they're structured
| | 02:10 | slightly differently.
| | 02:12 | And I want to use a different
set of data here, off to the right.
| | 02:15 | In columns I, J, K, and L, you see
information about items that have been
| | 02:20 | shipped, and depending upon the size
of the items, and where they have been
| | 02:25 | shipped, by the shipping
zone, the cost is different.
| | 02:29 | And so there are quite a few entries here.
| | 02:31 | It goes down to 297, so we have got 296
different items that have been shipped,
| | 02:36 | and we want to know the total cost by
size and shipping zone, looking at just
| | 02:41 | this one for the moment, that 37.79
that we see in L2 there, eventually would
| | 02:47 | emerge over in the right, at this
location, there, as part of a bigger total.
| | 02:52 | In other words, all the items of size 5
sent to shipping zone 5, what's the cost?
| | 02:58 | So we want to use a SUMIFS.
| | 02:59 | Let's begin right in the upper left
hand corne,r as it's typically done.
| | 03:03 | =SUMIFS and we would like to add
information from column L, and this is where
| | 03:09 | it's different from COUNTIFS.
| | 03:12 | Add information from column L.
We see criteria_range1, criteria1,
| | 03:16 | criteria_range2, and we can't see the
rest of it, but now we'll have pairs,
| | 03:21 | 2, 4, 6, 8, etcetera.
| | 03:24 | So, where are we looking here?
| | 03:26 | We're looking in column J, comma, and for the
moment, we're only thinking about what's
| | 03:31 | going to go into cell Q3
here, where we're typing this.
| | 03:34 | So we want to get information out of P3,
in other words, all the entries from
| | 03:39 | column J that are size 1, or equal to
the value of 1, so that's one pairing.
| | 03:44 | Now we need also do this for the pair
out of column K, and those are going to
| | 03:50 | be equal to, for the moment, just this cell,
the value of 1 as we see it in Q2, right there.
| | 03:57 | So for all the items that are size 1
that went to shipping zone 1, how much did
| | 04:02 | we pay for all of that? 64.14.
| | 04:05 | We can verify this pretty quickly here
by clicking in column K, going to the
| | 04:08 | Data tab and clicking AZ to sort this,
and doing the same thing in column J.
| | 04:13 | Click in there, hit the AZ button, and here
are all the items, size 1 shipping zone 1.
| | 04:20 | As we highlight these, you see the total
cost down the status bar, 64.14, that's
| | 04:25 | the same value we're getting here.
| | 04:27 | Now if we need to copy this as we would,
downward and rightward here, we need to
| | 04:31 | adjust this formula, a little
tricky here maybe, but not too lengthy.
| | 04:35 | So in editing this, we want the
reference to column L to be absolute.
| | 04:39 | Let's click F4 to take care of that.
| | 04:41 | We want the reference to column J to be
absolute, F4, and column K and with the
| | 04:48 | other two references, they
need to be what's called relative.
| | 04:51 | All of the size references will come
out of column P. Therefore, in column P
| | 04:56 | here, you can hit F4 a few times.
| | 04:58 | We want the $ sign in front of the
P not in front of the 3, and for the
| | 05:02 | reference for Q2, those references are
going to come out of row 2 all the time,
| | 05:07 | so I'm clicking F4 a few times.
| | 05:09 | We want the $ sign in front of the 2.
| | 05:11 | So that would be the master formula here,
and then we could drag this downward,
| | 05:16 | and then rightward, and that's the total
of all items that have been shipped out
| | 05:21 | by size and zone, and that total, you
can see it because it's highlighted,
| | 05:25 | you'll see at the bottom, is $8,668.54,
clicking column L, the same value.
| | 05:32 | So it's working properly.
| | 05:33 | We have the same exact totals.
| | 05:35 | Now AVERAGEIFS is just the same idea.
| | 05:38 | We could build off of this, if we wanted to.
| | 05:40 | What's the average shipping cost
per combination of size and zones?
| | 05:45 | We could simply click in here, in the
same general layout, and turn SUM into
| | 05:49 | AVERAGE, complete that entry, recopy
it downward, and then copy it to the
| | 05:54 | right to have averages.
| | 05:56 | We could possibly have done that on a
separate table. We're, just for the moment,
| | 05:59 | doing it right here.
| | 06:00 | So these three new functions, SUMIFS,
AVERAGEIFS and the previously noted
| | 06:06 | COUNTIFS, all extend Excel's
functional capabilities to even greater heights.
| | 06:11 | This will eliminate the need for
certain more complex Array formulas, but these
| | 06:15 | are power tools to be sure.
| | Collapse this transcript |
|
|
6. Statistical FunctionsFinding the middle value with MEDIAN| 00:01 | Many Excel users need, from time-to-
time, to tabulate information and whether
| | 00:05 | the data that you're working with is
of a database-like nature as we see here
| | 00:09 | in columns A through G or more
spreadsheetlike in nature, for example, what
| | 00:13 | we're seeing in columns K, L, M
etcetera, invariably, the need for statistical
| | 00:18 | function seems to arise.
| | 00:20 | Strangely enough, in Excel, in the
Ribbon, on the Formulas tab, you don't see,
| | 00:25 | right at the beginning,
Statistical functions as a category.
| | 00:29 | Under More Functions, click here.
| | 00:31 | You will see Statistical,
and there's the complete list.
| | 00:34 | And it's a pretty extensive list as well.
| | 00:36 | Now, I'm not a statistician, and yet,
like many people who use Excel, I do need
| | 00:40 | to get to certain features and functions.
| | 00:43 | And here's one right here that we want
to talk about a bit, MEDIAN, and it's a
| | 00:47 | fairly well-known measure, even if you
haven't taken statistics, I think most of
| | 00:51 | you have a sense of what it does.
| | 00:53 | I see it referred too often in day-to-
day life when talking, for example, about
| | 00:56 | housing prices, and a median value
is often contrasted with an average.
| | 01:01 | And the definition of median is the
middle value from a list of values.
| | 01:05 | And as you know, sometimes
you want to use a function.
| | 01:09 | You can simply click here, and what
I'm going to do is simply click into the
| | 01:12 | worksheet here, and maybe contrast
this, first of all, with average, the
| | 01:16 | average, for example, salary, a quick
way to get here would be to type =average,
| | 01:22 | there are other ways to get here as well,
and simply refer to the entire column
| | 01:26 | and we have that information at our fingertips.
| | 01:28 | Adding up all the salaries,
dividing by the number of entries.
| | 01:31 | Let's do contrast this with median, and
the MEDIAN function simply looks for a
| | 01:36 | set of values, in this case, perhaps
column F. Again, what's the median salary?
| | 01:41 | So rather than sorting the data and
finding the one in the middle, this does
| | 01:46 | all the work for us.
| | 01:47 | Now, by definition, median
means find the middle value.
| | 01:52 | If there's an odd number, it's the
one in the middle. It's the one.
| | 01:56 | There are an equal number of
entries on either side of it.
| | 01:58 | If it's an even number, Excel simply
takes the two middle values and comes up
| | 02:03 | with an average of those
two to provide a median.
| | 02:05 | And so, from time-to-time, you'll need
to contrast this with average and make
| | 02:09 | your own conclusions about that.
| | 02:11 | Similarly, here is a set of data,
so it doesn't always have to be a column.
| | 02:15 | It doesn't always have to be from
a database's style listing here.
| | 02:18 | Here too, we might want to compare the two.
| | 02:20 | We're not always doing that with
average and median, but why not do that here?
| | 02:24 | What's the average of
these numbers here? It's 577.
| | 02:28 | How about a median?
| | 02:29 | The same set of data and I like this.
| | 02:33 | Here, the difference seems to be more
substantial than I would have thought.
| | 02:36 | Sometimes there's a closeness there, so,
| | 02:38 | again, without drawing conclusions,
necessarily, do be aware of the ease of using this.
| | 02:43 | It's at your fingertips and it's one of
those things that nearly everybody needs to use.
| | 02:47 | Exploring those Statistical functions
from time-to-time will reveal others that
| | 02:50 | may or may not be of value to you,
but there are quite a few of them.
| | Collapse this transcript |
| Ranking data without sorting with RANK| 00:01 | In dealing with large sets of data or
a database-type list, one of the things we
| | 00:04 | all need at different times,
we don't need a function for it,
| | 00:07 | is simply to reorder the list.
| | 00:09 | It might be valuable to look at this
list with the salaries from high to low.
| | 00:14 | We want to rank them that way,
or in the reverse order, possibly.
| | 00:17 | But at the same time, we might also want
to carry with us, along with the data at
| | 00:22 | any time, that is, a ranking, and it
will change based on the adjustment of some
| | 00:27 | of the salaries or the
elimination of some of the records here.
| | 00:30 | We'd like to have at our
fingertips at all times,
| | 00:32 | A ranking of the salaries here,
and have it in a separate column.
| | 00:35 | I have set aside two columns here and
will show you how this might work in
| | 00:40 | column C, if you want this to be a
dynamic list and always know the ranking.
| | 00:45 | We do need a function here, and
sure enough, it's called Rank.
| | 00:48 | It's pretty simple and straightforward.
| | 00:51 | We are trying to compare this value
here with all the other entries in column
| | 00:55 | B. If column B has nothing else in it,
simply comma, using the entire column reference.
| | 01:01 | That's it for the first one.
| | 01:02 | That's the 74th highest
salary. This is top down.
| | 01:07 | The number one salary, the
highest salary will have the value of 1.
| | 01:10 | So we'll copy this down a column by
double-clicking the Fill Handle and
| | 01:15 | here's the first salary.
| | 01:16 | And right above this, notice
something, and it's coincidence that these
| | 01:20 | happened to be adjacent.
| | 01:21 | But it's not coincidence,
perhaps that they are the same.
| | 01:24 | Because that's going to happen from
time-to-time and the concern sometimes is
| | 01:28 | what does ranking do?
| | 01:30 | Well, these two entries share the
second ranking, they are the second highest.
| | 01:36 | And Rank ignores, in this case, a third
rank and the next entry that you would
| | 01:41 | find in the list, numerically is not
level 3 or third highest, but the fourth.
| | 01:48 | And, of course, the way to explain this
is this is the fourth highest entry.
| | 01:51 | That's true, this is the fourth
highest entry because up here we've got the
| | 01:55 | first highest and these share second
and third, but we see the number 2 there.
| | 02:00 | If you really needed to have this
displayed in such a way that you've got 1,
| | 02:03 | two 2s and then you want that number 4
really to be 3, then you will have to
| | 02:07 | explore that using array formula which
were much, much more complicated than
| | 02:12 | what we are using here.
| | 02:13 | So Rank does the job and I think most
people would be happy with the way it does it.
| | 02:18 | Now based on certain kinds of data, not
necessarily salary data, but sometimes
| | 02:22 | it makes more sense or your need is
based on saying well, for example, I want
| | 02:27 | the lowest sorry to be 1 and
then the highest salary to be 99.
| | 02:31 | Sometimes you want a reverse order here.
| | 02:33 | And there is no X rank or D
rank or some other way to say this.
| | 02:37 | We simply have to put
together some functions here.
| | 02:40 | And what we need to know is the
total count of salaries, or, expressed in a
| | 02:45 | different way, we begin with the
idea we want to know how many entries in
| | 02:49 | column B have values.
| | 02:51 | In other words, we do not want to count B1.
| | 02:53 | The function we are talking about here
is Count, and its purpose simply is to
| | 02:58 | tell us how many cells in this
particular range, namely column B, have values?
| | 03:04 | There are 99 of them.
| | 03:06 | So they are actually 100 rows of data here.
| | 03:08 | Row 1 has the labels and all
the other rows have values.
| | 03:13 | So they are 99 entries here and what we
want to do with that value is subtract
| | 03:18 | from it the ranking.
| | 03:19 | Now we could possibly use the data in
column C, but let's do this as is if we wanted
| | 03:23 | this completely separate in its own column.
| | 03:26 | We want to repeat that
same calculation for rank.
| | 03:29 | How does this salary, comma, compare with all
the others in column B? and because we
| | 03:35 | don't want a zero in one of our
answers, and we would get that here,
| | 03:38 | we need to add one.
| | 03:40 | So this first person's ranking now is 26,
and as we copy this down the column by
| | 03:45 | double-clicking the Fill Handle,
we see the entries this way.
| | 03:48 | So the entry here that is first is now
the 99th and somewhere in this list we'll
| | 03:54 | see an entry of this 1st in
our new way of calculation.
| | 03:57 | Here it is, and previously this had been 99.
| | 04:00 | So that's how to do a reverse order here.
| | 04:02 | Now there are other times, too, when
maybe these rankings are more interesting
| | 04:06 | when you're dealing with
a smaller group of data.
| | 04:09 | Again, in a larger context, if this is
near other information, we might want to
| | 04:13 | do a ranking here and a little
shortcut that will come in handy from
| | 04:17 | time to time, which you can use
in a lot of functions and formulas,
| | 04:20 | Why not just highlight the
data all at once here? =rank.
| | 04:24 | We want to compare this entry here,
comma, with all the others in column I.
| | 04:29 | Simply hit Ctrl+Enter here and we've
got our ranking there, and here too,
| | 04:34 | you'll see some repeats.
| | 04:35 | This is the fourth highest, but this one
too is also fourth highest, so there is
| | 04:39 | no fifth entry in there.
| | 04:41 | So similarly used, although with a much
smaller group of data, the Rank function
| | 04:44 | certainly has its role to play in
showing us rankings without necessarily
| | 04:48 | forcing us to sort the data.
| | Collapse this transcript |
| Finding the magnitude data with LARGE and SMALL| 00:00 | A common function known by many Excel
users is simply to find the highest value
| | 00:05 | from a list of entries.
| | 00:07 | And in cell I2, we see the Max function
meaning Maximum being used, the highest
| | 00:12 | salary found in column F is
simply this value here, straightforward.
| | 00:18 | I remember, for years, not necessarily
needing but then suddenly needing a way to
| | 00:22 | calculate the second-highest entry in
a list and also third and I ended up
| | 00:27 | sorting the data and that was okay for
the moment, because I just simply wanted
| | 00:31 | to see the information, but certainly
there are times and there have been times
| | 00:34 | in my situations too where I
really need to tabulate the information.
| | 00:38 | I want to know the second-highest salary or
the third, based on any ranking that I might need.
| | 00:44 | The function is called Large.
| | 00:47 | Pretty easy, pretty
straightforward, where are we looking here?
| | 00:49 | For example, in column F, Salary, comma.
Want the second-highest salary? Put in a 2.
| | 00:56 | It's as straightforward as that.
| | 00:58 | If you wanted to build a list of
these like, I've already got the highest
| | 01:01 | here, and it's going to put in some
numbers over here, but 2, 3, 4, 5 and we
| | 01:06 | could work off of that and create a
little list of, if we wanted to see the
| | 01:10 | five highest salaries.
| | 01:12 | So instead of this being a 2, just
make it referred to a cell that has that
| | 01:15 | value in it, and recopy these by double-
clicking and we have all these entries
| | 01:19 | and a quick format, it looks
pretty good, and there we go.
| | 01:22 | Easy to use, the Large function. Just like that.
| | 01:26 | Rather than trying to come up with some
obscure way of taking the original value
| | 01:30 | and subtracting from our total and so on,
there is a Companion function, and sure
| | 01:34 | enough, you guessed it.
| | 01:35 | It's called Small and works,
of course, from the bottom up.
| | 01:38 | Looking at all the entries here,
what's the second smallest?
| | 01:42 | If we really want to find the smallest,
of course, we could use the MIN function.
| | 01:46 | But we may want to know the second
smallest, third smallest, etcetera.
| | 01:49 | Second smallest is 8,904.
| | 01:50 | That's one of our part-time employees here.
| | 01:54 | So quick and easy to use, the
Small function, the Companion to Large.
| | 01:58 | One of those functions that you don't
necessarily need, but when you do need
| | 02:02 | the capability it's there and it's a
reminder that there are so many different
| | 02:05 | functions in Excel you just might not have
had the need for until one day, and there it is.
| | Collapse this transcript |
| Tabulating blank cells with COUNTBLANK| 00:00 | In looking at the information you
are seeing on the screen here,
| | 00:03 | in column G, you see that some
people have benefits, the D presumably for
| | 00:06 | Dental, M for Medical, R for Retirement.
| | 00:09 | Not everybody in this
list has a benefits package.
| | 00:12 | We might want to know, who doesn't, or
perhaps, from a different perspective,
| | 00:17 | how many people do not.
| | 00:19 | In other words, what we'd really like to
do is come up with the way to count the
| | 00:22 | entries in column G that contain spaces.
| | 00:24 | A COUNTIF comes to mind as one possibility.
| | 00:28 | But there is a function that gets
directly to the point and it's called
| | 00:31 | COUNTBLANK, and this example here, let's
just highlight the cells we are looking
| | 00:36 | at. It would be in column G here,
just highlight these cells.
| | 00:39 | Now this is a larger list.
| | 00:41 | This is more of a drag perhaps,
but nevertheless, not too big here.
| | 00:44 | How many blanks are found there?
| | 00:46 | And that will tell us. How many
people do not have benefits? It's 28.
| | 00:50 | That's the number of blanks we found in
column G. And if you are using that with
| | 00:56 | a larger list, be prepared either to
drag or possibly to type in the entry.
| | 01:00 | If you refer the entire column, you
will be coming up with a value like this, or
| | 01:04 | near something like this.
| | 01:06 | This is the total number of rows in
Excel 2007 and so a simple COUNTBLANK here will
| | 01:12 | reveal and this might be trivia, but on
the other hand just to point this out,
| | 01:15 | if we do this for the entire column G,
that number is based on this minus the
| | 01:21 | ones where there are entries.
| | 01:23 | So the other question that might come out
of this is, how many people do have benefits?
| | 01:27 | And so here what we'd use is equals and
we'd probably start off with just a simple
| | 01:31 | idea of how many entries in column G do
have any data at all, with count A? And
| | 01:39 | this will tell us how many actual
entries there are in column G, and one of
| | 01:42 | those is G1, so we'd be
mentally subtracting 1 there.
| | 01:46 | So there are 71 people
who do have benefits here.
| | 01:49 | You could approach to that in a
different way with COUNTBLANK function, but I
| | 01:52 | think this is probably the better
way to do it here, simply subtract 1.
| | 01:56 | Now, another technique here, too. If
you'd like to fill in the blanks here,
| | 02:00 | you can't click column G, and not so
well-known is that on the Home tab, in the
| | 02:05 | Editing group, on the extreme right side,
under Find and Select, there is a Go To
| | 02:09 | Special and you could click that
button and choose just the blanks here.
| | 02:14 | So all the blank cells are highlighted,
and not the ones below the data, but
| | 02:18 | just within that solid cluster of data here.
| | 02:20 | You might just want to put in here N/A
possibly, or any word that might be appropriate.
| | 02:26 | If you do put in N/A, it might get
lost in the mix, so you might put in the
| | 02:29 | space, put in some hyphens or something.
Do that in a way that makes it stand
| | 02:32 | out, and just type Ctrl+Enter to
complete the entry and those will all be
| | 02:37 | filled in with NAs.
| | 02:38 | That's a thought, not necessarily
related to what we are doing with COUNTBLANK
| | 02:41 | but that might have some merit, in its own right.
| | 02:44 | Now as we look at the information
over here, here is another example, and
| | 02:48 | just to point out that we are not always
looking in a single column or in a single row.
| | 02:52 | How many blanks are here?
| | 02:53 | You can see pretty clearly, there are three.
| | 02:55 | But just point out the idea that
COUNTBLANK certainly has its uses here and
| | 02:59 | there to give us a quick count of
how many cells, here, contain nothing in
| | 03:04 | this group right here?
| | 03:06 | And here the answer is going to be 3.
| | 03:08 | So a quick, easy-to-use function which
has its uses here and there, as you are
| | 03:12 | trying to tabulate
information from various sets of data.
| | Collapse this transcript |
|
|
7. Date FunctionsUnderstanding Excel date/time capabilities in formulas| 00:00 | The Excel Date Time system is
comprehensive and very powerful and valuable.
| | 00:06 | Many people really need to use Dates and
Times in their worksheets and they also
| | 00:09 | need to do some tabulation with them.
| | 00:11 | I think a lot of people also
overlook some of the capabilities of Excel's
| | 00:15 | Date and Time system.
| | 00:16 | It's a long story to talk about where
the Date system came from and its origin
| | 00:21 | and how it all works.
| | 00:22 | But often it boils down to this.
| | 00:24 | A date entry in Excel, if you follow
certain basic rules, actually stores a
| | 00:29 | value in the cell, and although you
don't necessarily need to see that value
| | 00:34 | it is the core behind how the
entire Date system works.
| | 00:38 | If you do enter dates properly in Excel, you
can later figure out what day of the week it is.
| | 00:44 | You can subtract dates.
| | 00:45 | You can look into the future, into the past.
| | 00:47 | You can indicate length, and some of the
things we are seeing on the screen here
| | 00:51 | in column B suggest things we do with dates.
| | 00:54 | In column D, there are a few dates and
couple points here about data entry too.
| | 00:59 | If you're entering dates that are in the
first decade of the 20th century,
| | 01:03 | first of all when you type in a month most
people don't type in 08 for August.
| | 01:07 | They will simply type an 8. That's fine.
| | 01:09 | And always use slash or hyphen.
| | 01:11 | That optimizes your use of the system.
| | 01:13 | Whatever is more convenient for you.
| | 01:15 | I think slash is more common, month/
day, and if it's a one digit day just
| | 01:20 | the simple day, 8/3/.
| | 01:23 | If this is a 2007, put in a 7. That's it.
| | 01:26 | Good enough.
| | 01:28 | The other thing you should do when
you're putting in dates and you might already
| | 01:31 | be seeing something in column D
that looks a little bit strange.
| | 01:34 | Make the column wider. I am doing this
here on purpose now. Of course something
| | 01:39 | does look a little bit different and
you probably know as most of us do that
| | 01:42 | there is no November 31st.
| | 01:45 | You wouldn't have seen that obvious typo,
if the column was as narrow as it had been.
| | 01:50 | So just at least temporarily, you can
later adjust it, for Date columns, make it
| | 01:55 | wider than is necessary and impossible
dates like this. 2/29. Now it doesn't
| | 02:01 | make any difference whether you
put in a four digit year or not.
| | 02:04 | You can't fool Excel.
| | 02:05 | There is no such date, so
it becomes left aligned.
| | 02:08 | Now you will defeat the purpose of
this indicator, if you happen to have a
| | 02:13 | column right aligned.
| | 02:14 | Now just the label is here, but if we
make the entire column right aligned,
| | 02:18 | you are not going to see those typos and
you might have some bad dates in there.
| | 02:21 | So don't keep it right aligned.
| | 02:24 | So make the data entry as you wish.
| | 02:26 | There's some other issues here that might
surprise you regarding Dates and Times in Excel.
| | 02:32 | Here are two dates a year apart.
| | 02:34 | Well, actually they are
not a year apart, are they?
| | 02:36 | They are a century apart practically,
but it does bring up an issue here.
| | 02:39 | You see the numbers over here, 30-99.
| | 02:41 | I have put them there for reference.
| | 02:44 | Any entry for a year that you might
make, and if you were typing this and say
| | 02:48 | you're dealing with issues regarding
ages of people, maybe this is the Social
| | 02:52 | Security office or it's an
office of a retirement community.
| | 02:55 | You got the ages of people possibly.
| | 02:57 | 12/3/30, what happens? It becomes 1930.
| | 03:03 | What if you type 12/3/29?
| | 03:07 | You are thinking of a person who is
exactly a year older than the other
| | 03:09 | person and you hit Enter. What happens?
| | 03:12 | It's 2029.
| | 03:14 | Microsoft has decided and they made
this decision 10 years ago, and they'll
| | 03:18 | probably have to change the default
entries in another five years or so.
| | 03:22 | Any time you put a year in a date entry
that's 0-29, it's in the 21st century.
| | 03:29 | If the year is 30-99, it's in
the previous century, the 20th century.
| | 03:35 | Now, if you use four digit displays,
you will see the result immediately
| | 03:39 | adjusted and of course the solution here
is to type a four digit year when necessary.
| | 03:44 | But if you do have these displayed,
for example using format cells with a two
| | 03:48 | digit year, you're not going to see
this difference, and here and there
| | 03:52 | it's going to cause some problems
down the road, as it might here.
| | 03:56 | That's 1930, this is 2029, you
can see that in the Formula Bar.
| | 04:00 | Now some basic issues here with Date math.
| | 04:03 | In cell B3 we want to know how much
time has elapsed between these two dates,
| | 04:07 | how many days?
| | 04:09 | This might have to do with a
person's tenure within an organization.
| | 04:12 | It might have to do with that copying machine
down the hall, which just went on the blink.
| | 04:16 | How long have we had it?
| | 04:17 | Let's subtract these. The unit of measure
in the Date Time system is one equals a day.
| | 04:24 | Equal higher date, the later
date minus the earlier date.
| | 04:29 | Now, what you don't necessarily know,
I mentioned the fact that Excel is
| | 04:33 | actually storing values here.
| | 04:36 | The entire Excel Date system begins January 1,
1900 goes all the way until the year 10,000.
| | 04:42 | And whether you know it or not, when
you're entering a date you are actually
| | 04:45 | putting in a value, provided it's a proper date.
| | 04:48 | If you want a quick look at this, and it's
not critical, you might click the comma button.
| | 04:52 | It's in the number group on the Home tab,
and you would see this value and
| | 04:56 | of course there is another value for this and
Excel is just subtracting the values there.
| | 05:01 | Now, we can look into the future just as easily.
| | 05:04 | By the way, I meant to point out
here too, in Excel 2003 and in all prior
| | 05:09 | versions, when you subtract dates,
the answer comes up as a date and
| | 05:13 | it really is unsettling and you have to
kind of know what you are doing and then
| | 05:16 | turn it into a value.
| | 05:18 | But in 2007, they have
corrected that so that works nicely.
| | 05:22 | Sometimes you will have to look into the future.
| | 05:24 | When is 1,500 days from the
date of this installation?
| | 05:27 | Equals that date plus the 1500.
| | 05:30 | Remember unit of time is a day.
| | 05:33 | 1,500 days into the future, there it is.
| | 05:36 | And certainly looking into
the past, the same general idea.
| | 05:39 | 90 days ago, if this were today's date or
the date in question equal this minus 90.
| | 05:47 | There we go, 90 days ago.
| | 05:52 | Not only can Excel handle dates, but it
also handles times, and you want to be
| | 05:56 | thinking of time as a portion of a day.
| | 05:59 | And here too, there is a value being stored.
| | 06:01 | It's a little bit past 8 AM.
| | 06:02 | That's roughly a third of a day, and
again, you don't usually need to know this
| | 06:06 | or think too much about it, because
Excel can handle time math as well.
| | 06:11 | A quick look here, just with
the comma button, it's .34 days.
| | 06:16 | So a day is broken into hours, and if we
did this by math, for exactly 8 o'clock,
| | 06:21 | that will be .3333 etcetera.
| | 06:23 | Noon would be .5 and so.
| | 06:27 | Usually, you don't worry about that.
| | 06:28 | Two different entries here.
| | 06:30 | Now how do you make time entries?
| | 06:32 | If you simply put in a time, if it's
below 12 hours, it's automatically AM.
| | 06:37 | So an entry like 8:13 is automatically,
whether you see the AM or not, it's an AM entry.
| | 06:45 | If you type 4:41 and do
nothing else, that's 4:41 AM.
| | 06:52 | And you got two options there.
| | 06:54 | 4:41 p, Enter, good enough.
| | 06:59 | It puts in 24-hour style.
| | 07:02 | And of course you could have typed
it as 16:41 if you're familiar with
| | 07:06 | that style of reference.
| | 07:08 | So on putting in those kinds of times,
think about what's most convenient to you.
| | 07:13 | If we subtract times, we sometimes
get a slightly funny variation on this.
| | 07:17 | Equals a later time.
| | 07:19 | That's this minus this.
| | 07:21 | 8 hours 28 minutes.
| | 07:24 | Because this cell was
previously formatted, it looks like this.
| | 07:27 | Sometimes you'll see AM and PM in the
answer and that throws you a little bit.
| | 07:31 | So you'll have to reformat that or
make it look proper, if it doesn't.
| | 07:35 | Now the question also comes up, what if,
because maybe it has something to do with
| | 07:39 | working time and you say, well,
I took 45 minutes for lunch.
| | 07:42 | You're going to subtract 45 minutes from this.
| | 07:44 | Well, one thought that might run through
your head is, well, an hour is 1/24th of a day.
| | 07:49 | If we subtracted 1/24th from
this, it would be an hour less.
| | 07:53 | But we are talking about 45 minutes
and that's three quarters of 1/24th.
| | 07:57 | I mean, you could do the math.
| | 07:59 | That's one 32nd and so on.
| | 08:00 | So, that's a little bit clunky and
cumbersome and kind of geeky too.
| | 08:04 | But surprisingly you can actually subtract
a time this way, "0:45." 45 minutes less.
| | 08:15 | 7 hours and 43 minutes
we are talking about here.
| | 08:18 | And you can also do time
math across multiple days.
| | 08:21 | Now you can't make the entry like this,
but if you look at these for a second or two,
| | 08:25 | you will see if it had been on
the ending date here 6 PM, that would be
| | 08:30 | exactly 2 days or 48 hours.
| | 08:32 | So it's three hours short of that.
| | 08:33 | It should be 45 hours.
| | 08:35 | I'm going to move these over here for reference.
| | 08:37 | How do we put an entry like this in here?
| | 08:40 | And you can do it in one
cell, 11/18 is the date, /9.
| | 08:47 | We could type it that way even,
space, and it's 6 PM. How about 6 p?
| | 08:52 | Enter. Notice that it does go in the
standard kind of way and that is a value
| | 08:57 | being stored there.
| | 08:59 | Same idea here, 11/20/9 3 p, Enter.
| | 09:08 | When we subtract the two here, equal
the later time minus the earlier time,
| | 09:14 | we are hoping to see 45 hours.
| | 09:18 | But we get a strange number.
| | 09:20 | So immediately let's jump right into
Format Cells, and of course we would want
| | 09:26 | to display this is as a time, and
this would be the choice to make.
| | 09:31 | We don't want to see AM/PM here
because we are subtracting times.
| | 09:36 | And yet that's not right either.
| | 09:38 | So what's going on here?
| | 09:39 | From time to time when you're
dealing with time math, either addition or
| | 09:43 | subtraction, you need to do a special format.
| | 09:47 | Unfortunately, Excel doesn't tell you
what to do here in the Time category in
| | 09:52 | the list of examples here.
| | 09:53 | The one with the 37 is
the one that we need to use.
| | 09:56 | Now, certainly not obvious.
| | 09:58 | Since we don't care about seconds here,
the other fix you'd probably want to
| | 10:02 | make here is to jump over into Custom
once you selected this and keep only the
| | 10:08 | hours and the minutes in the display here.
| | 10:10 | The hours within brackets means
that it will handle hours over 24.
| | 10:15 | To look at that number again, that's
24 hours short of what it needs to be.
| | 10:19 | Click OK, and finally we get our answer there.
| | 10:21 | So you can tabulate times across multiple days.
| | 10:24 | I think you can see there is just a
wealth of opportunity here for any situation
| | 10:29 | where you have got dates and times,
and you're trying to measure the various
| | 10:32 | kinds of differences that
occur with these kinds of entries.
| | Collapse this transcript |
| Identifying the day of the week with WEEKDAY| 00:00 | An important piece of information when
dealing with Date data can be day of the week.
| | 00:06 | For example, you're trying to tabulate sales.
| | 00:08 | Are sales better on Tuesday
or they better on Thursday?
| | 00:11 | You have got a huge list potentially.
| | 00:13 | Let's find out what day of the week a
particular date entry happens to be.
| | 00:18 | In column A here, we see some sale dates.
| | 00:20 | We would like to know day of the week,
real convenient function, =weekday.
| | 00:25 | Unfortunately, the answer is
not appealing. What does 2 mean?
| | 00:29 | Monday. 1 is Sunday, 7 is Saturday and so on.
| | 00:33 | In order to make this appear as a day of
the week, we have got a couple of quick
| | 00:37 | options but we do have to
make a formatting change.
| | 00:40 | Looking ahead here we can simply
double-click to see the others.
| | 00:43 | The number that might out here could be a
little strange depending upon the work environment.
| | 00:47 | Maybe this is an operation
that was not open on Sundays.
| | 00:50 | So this emerges as a Sunday.
| | 00:52 | That's the weekday of that particular date.
| | 00:56 | So maybe that's a mistake.
| | 00:57 | Maybe it's a typo or something weird happened,
but that would certainly get your attention.
| | 01:01 | But if we want to see the actual day of the
week here, might as well format all these at once.
| | 01:06 | Jump right into right-click Format
Cells, and a Custom format consisting
| | 01:14 | simply of 3 d's, if we would like to
abbreviate it, so it would look like this.
| | 01:19 | Or same place, right-click Format Cells, 4 d's
to get a full spelling, if that's important.
| | 01:26 | The key idea of course is the numbers
by themselves do the work but you got to
| | 01:30 | make the display be worthwhile
depending upon who needs to see this.
| | 01:33 | So that might be a better approach.
| | 01:35 | And maybe that's a typo and maybe not,
but you will certainly look into it.
| | 01:39 | So that's good information.
| | 01:41 | And the other issue that might come
out of this, someone is looking at this
| | 01:44 | and saying, "could we sort this and look at all of
our Monday sale dates today here, could we do this?"
| | 01:48 | If you were to do a sort on this,
what's actually being dealt with here,
| | 01:53 | what's happening in the background?
| | 01:55 | If we jump into the Data tab and use
the AZ Sort button, that contiguous
| | 02:00 | data will be sorted.
| | 02:02 | And we see what's happening here.
| | 02:04 | Now because the numbers are underneath it or
behind the scenes, that's why it's working.
| | 02:08 | So here are all of our Monday sales and
again, imagine how this might play out
| | 02:12 | with a much larger list if
you need that sort of order.
| | 02:16 | Sometimes we need more
sophisticated use of this.
| | 02:18 | Let's talk about this idea.
| | 02:20 | In your organization you've got the product.
| | 02:22 | When a sale occurs then some packing
has to be done, some assembly possibly,
| | 02:29 | before this is ready to be shipped.
| | 02:31 | And maybe these are some kinds of
large items, four days have to occur before
| | 02:35 | the shipping date here.
| | 02:36 | So we could do simply, = whatever the
value is plus 4 to set up a shipping date.
| | 02:43 | So you can see what would happen here.
| | 02:45 | However, what if the shipping date is a
Sunday and you don't do shipping on Sunday?
| | 02:49 | So what we might do in a situation like
this is in effect say, okay, we want to
| | 02:53 | do this most of the time, but on the
other hand we might want to put in a check
| | 02:57 | here to see if the weekday of this
four days later, this there right here.
| | 03:05 | If the weekday of that =1, meaning
Sunday, then what do we want to do with the
| | 03:10 | shipping date, what do we want it to be?
| | 03:12 | We want it to be this date Plus 5.
| | 03:15 | Otherwise we will turn it into
simply this value right here.
| | 03:20 | I am hitting Ctrl+C here to copy
it and make that be the answer.
| | 03:25 | So once again, if the intended four day
difference there turns out to be a Sunday,
| | 03:31 | we don't want that to be the shipping date.
| | 03:32 | We will add 5 to the date.
| | 03:35 | Otherwise, we will simply keep that date plus 4.
| | 03:38 | So as we tabulate this here, and of
course we don't know the answers at glance here,
| | 03:41 | but that's a simple choice here
of the difference of the two, equal this,
| | 03:47 | minus this, Ctrl+Enter here
because they are all highlighted.
| | 03:51 | Here and there we see what's happened.
This got bumped into a Monday and so did this one.
| | 03:55 | So different creative uses of the
Weekday function, and you can imagine possibly
| | 03:59 | setting up some data validation rules
to do this in a slightly different way.
| | 04:03 | But again, that Weekday function
gives us potentially valuable information.
| | 04:08 | Imagine analyzing your workflow and a
variety of different business issues that
| | 04:13 | are going to come up when
you know the day of the week.
| | Collapse this transcript |
| Counting working days with NETWORKDAYS| 00:00 | In dealing with dates in Excel,
sometimes you need to know not just the
| | 00:04 | difference between two dates, the
number of days elapsed but the actual
| | 00:07 | number of working days.
| | 00:09 | For example, Monday through Fridays.
| | 00:11 | And even though some operations work
different numbers of days of the week,
| | 00:14 | we are talking about working days,
meaning specifically Mondays through Fridays,
| | 00:19 | not Saturdays and Sundays.
| | 00:21 | An illustration of the issue and the
differences might come up simply when we
| | 00:25 | are trying to measure the difference
between two dates, and notice this initial
| | 00:29 | set of dates here is being
repeated in the next two rows.
| | 00:33 | How much time is between the two dates
equal the later date minus the earlier date,
| | 00:39 | and there is the answer.
| | 00:41 | Now that does include Saturdays and
Sundays, and so that's not a pure measure of
| | 00:45 | actual working days.
| | 00:47 | In this case, we need to use
a function called NETWORKDAYS.
| | 00:50 | It's one of those longer functions.
| | 00:54 | So when you are typing it, =n,
we see the list of all the others.
| | 00:59 | You could possibly just click on this
instead of typing it and use the Tab key
| | 01:02 | to save yourself a little bit of time.
| | 01:04 | The starting date is the A3
cell containing June 11th, Comma.
| | 01:09 | The ending date is September 14th.
| | 01:13 | Now there is an additional optional
third argument, which I'm going to ignore
| | 01:16 | here, and you do know of course, there
are holidays between those two dates.
| | 01:20 | We will simply hit Enter here.
| | 01:22 | And a major difference of course between
the previous entry, because we are now
| | 01:27 | not counting Saturdays and Sundays,
but there are some holidays in here too.
| | 01:31 | And in some organizations July 3rd was a
holiday because of the weekend and so on.
| | 01:36 | Here is July 4.
| | 01:37 | It happened to been a Saturday in 09.
| | 01:40 | It will not be discounted twice
because it's already a Saturday.
| | 01:44 | But let's see how this is going
to work a little bit differently.
| | 01:47 | In the next use of this and to
simplify it I will copy this first and then
| | 01:51 | adjust this to now take
into account the holidays.
| | 01:56 | Although, I could highlight just
the cells in question, why not just
| | 01:59 | highlight all of these?
| | 02:00 | It might make it simpler to copy.
| | 02:02 | If we are going to be copying this
too, we do want to make this be an
| | 02:07 | absolute reference.
| | 02:08 | So I will highlight that and hit F4.
| | 02:10 | So in this case now
instead of 68 days, it's 66 days.
| | 02:14 | And the difference is this time
around not only did it not copy or include
| | 02:19 | Fridays and Saturdays as in the previous
case, but in this case here it also did
| | 02:24 | not include these dates here.
| | 02:27 | And again, because one of those was
already a weekend, we didn't get the
| | 02:29 | double count on it.
| | 02:31 | And so tabulating into the future, and
we have got our list of holidays, that
| | 02:35 | list could go across
many years if you wanted to.
| | 02:37 | We will simply double-click
and see the differences here.
| | 02:40 | Now one of these, I made a mistake on the
entry, so we will simply adjust this here.
| | 02:44 | We will make the one over here be,
for example, make it just be the first.
| | 02:48 | That's a short entry for sure.
| | 02:49 | But we see what's happening there, just 9 days.
| | 02:52 | So you can see how this plays out.
| | 02:54 | If you're trying this in previous
versions of Excel by the way you might not be
| | 02:58 | able to get to the function because it
was one of those special functions that
| | 03:02 | require the addition of the Analysis Tool Pack.
| | 03:05 | So it's automatically built into Excel 2007, and
very valuable in some situations and easy to use.
| | Collapse this transcript |
| Determining a completion date with WORKDAY| 00:00 | If you are dealing with data entries,
and trying to calculate into the future
| | 00:04 | how long a project might take, for
example, the information in columns C and D
| | 00:09 | is setup automatically.
| | 00:11 | Notice that I have put in the starting
date in the Project Length three times
| | 00:15 | here to illustrate a difference.
| | 00:16 | A simple use of the method to add dates
and times allows us to simply say equals
| | 00:23 | this value, plus this 60
days from June 11th is this.
| | 00:28 | Now unless your environment is a 24x7
kind of operation, this would mean the
| | 00:33 | project beginning on June 11th working
day by day by day takes 60 days, it would
| | 00:37 | be finished on August 10th.
| | 00:40 | But many, many operations don't work Saturdays
and Sundays, so we don't want to include those.
| | 00:45 | So for comparison here let's
use a function called WORKDAY.
| | 00:49 | The WORKDAY function begins with a starting
date at June 11th, comma. And how many days?
| | 00:57 | We will be working 60 days.
| | 01:00 | We do not want to count Saturdays and Sundays.
| | 01:02 | And the optional holidays
we'll show you in just a second.
| | 01:05 | So when is this completion
date now as we look at it?
| | 01:08 | Now it's quite a bit later.
| | 01:10 | It's on September 3rd, but there are
potentially some holidays in the next year.
| | 01:16 | And having a list of holidays nearby
will make a difference. In this case,
| | 01:20 | we got a couple of dates that July 4th
weekend. Maybe not a huge difference.
| | 01:24 | Let's do the same sort of thing here.
| | 01:26 | Copy this and adjust it by putting in holidays.
| | 01:30 | Now you can certainly include a list
that goes well beyond the holidays we need,
| | 01:35 | but let's say we might be using this
list from time to time with other dates in
| | 01:38 | the same column here.
| | 01:40 | So we'll highlight them all, and
make that be an Absolute Reference and
| | 01:45 | a different ending date than we saw
previously, and then the other examples and of
| | 01:48 | course the difference here is that
the July 3rd which was a Friday is not
| | 01:52 | included, July 4th is the Saturday, it
wasn't included anyway, and I am going to
| | 01:56 | quick double-click here gives
us some other completion dates.
| | 02:00 | In all cases here the function is
taking into account, not the Saturdays and
| | 02:05 | Sundays and not the holidays that are
part of that list that we see over in
| | 02:10 | column A. So easy to use just sort of
variation on the other kinds of DATE
| | 02:14 | functions, but again it gives us that
quick ability to tabulate information and
| | 02:19 | not include Saturdays and Sundays.
| | Collapse this transcript |
| Tabulating date/time differences with DATEDIF| 00:00 | If you're trying to tabulate differences
between dates, there is a great feature
| | 00:05 | in Excel that you might not be able to find.
| | 00:08 | In fact it's a function that you will
not find in the Excel Help System and is
| | 00:13 | called DATEDIF, and interestingly
enough anytime you type the equal sign
| | 00:20 | followed by a letter, you'll see
functions that begin with that letter and where
| | 00:24 | is DATEDIF? It is not there, and start
looking to the Excel Help System, if you'd
| | 00:29 | like to waste a lot of time,
because you will not find this one.
| | 00:33 | And I am not sure why
Microsoft has taken that approach.
| | 00:35 | This has a number of great options.
| | 00:37 | I think most people will use it
most often in the following way.
| | 00:41 | We are trying to tabulate the
difference between two dates begin with the
| | 00:45 | starting date, in this case the starting
date is in A2, the ending date is in B2.
| | 00:52 | Quick math in your head.
| | 00:53 | That's about six years.
| | 00:54 | But we can make the answer be a
variety of different things and the answer in
| | 00:59 | this case perhaps, we want to know, years.
| | 01:02 | Now, we are not looking for a fraction
here, how many whole years has it been.
| | 01:05 | It's been six years and a few days,
but within double quotes, we will put in the
| | 01:10 | letter Y. Now notice over in
Column E, we have some other options.
| | 01:13 | That's it, how many years, and I'll
do a quick double-click here so we can
| | 01:17 | see what's happening.
| | 01:19 | In the other entries and column A
and B, it's equivalent to what we do
| | 01:23 | with birthdays as well.
| | 01:24 | So let me change a date here, and you
can imagine what it might be doing here.
| | 01:28 | I am going to change the
starting date here to be July 1st.
| | 01:34 | And you can say well that person has been
here almost 6 years, while yeah, almost.
| | 01:37 | But this is what we do with our
birthdays, if you are sensitive about that as
| | 01:41 | all of us tend to be
after a while. You're 39.
| | 01:43 | You are not 40 yet, until that date
maybe. This is exactly what it does.
| | 01:47 | It's like an anniversary date.
| | 01:48 | So that certainly has its role to play,
Y. Now in doing this with live data,
| | 01:55 | what you sometimes will want to do is
maybe not have an end date, but maybe have
| | 02:01 | today's date in here.
| | 02:03 | Now at the time of this
taping, it's November 4th of '09.
| | 02:07 | But let's put in the function called
TODAY, followed by two parentheses.
| | 02:12 | That's the function and we
get a different answer here.
| | 02:15 | And again, it's November 4th of '09.
| | 02:17 | In this case let me just hide this to
get that out of the way for the moment,
| | 02:21 | think of November 4th, '09 and recopy these.
| | 02:24 | Now for some kinds of worksheet
structures, this might be a starting date.
| | 02:28 | This might be years of service.
| | 02:30 | How many years has this person been here?
| | 02:32 | And again, these are like anniversary
dates or like birthdays in that sense.
| | 02:36 | If we use Y, and again it's not always
that you would use the TODAY function,
| | 02:41 | but for those kinds of situations,
it would be an ideal use of it.
| | 02:44 | Let me revert to the previous example
because we have that on the screen, and
| | 02:47 | I'll come back and unhide this, and go
back to a previous use here of actually
| | 02:53 | using that date that we see there because it's
a better visual reference here, and a recopy.
| | 02:59 | Now we could tabulate the number of months.
| | 03:01 | You're less likely to need this, but
still how many months have elapsed there,
| | 03:05 | and again, four months and one
more day and that would be 72 months.
| | 03:10 | That would be exactly 6 years.
| | 03:11 | 6 times 12, you get the idea of the months.
| | 03:15 | But notice some other combination days
again, probably less likely although in
| | 03:19 | some situations if we were talking
about equipment, or program or something,
| | 03:23 | how many days has that been around
between those two dates or how many dates
| | 03:27 | was it around, 2191.
| | 03:29 | So that's a day tabulation.
| | 03:31 | But in other case as you're trying to
figure out how many months have occurred
| | 03:34 | since the last yearly anniversary.
| | 03:37 | So we put the YM here, how many
months since the last anniversary.
| | 03:42 | Now this person here, since I changed the date.
| | 03:45 | It's almost 12 months, but not yet.
| | 03:48 | It's still the 11 months,
since the last yearly anniversary.
| | 03:51 | Again changing the date for a
different reference point here.
| | 03:54 | What if this had been October?
| | 03:57 | That's about four months
short of the year. There we go.
| | 04:01 | It's 8 months since the last yearly anniversary.
| | 04:04 | In other words, looking at the data
here, you can see how it's eight months
| | 04:07 | since, in this case that
would have been October 30th of '08.
| | 04:11 | So you kind of get the idea, and you're
less likely to use the other three here,
| | 04:15 | but hang on, the number of days since
the last yearly anniversary a quick look
| | 04:18 | there using those adjusted dates.
116 days, and one last one, there you see,
| | 04:25 | the number of days since the last monthly
anniversary so the value here has got to
| | 04:29 | be under 32, depending on where we
are in this particular set of dates.
| | 04:33 | So some really valuable information.
Again, stressing the fact that Y is probably
| | 04:37 | the most useful for most people and
again bringing up the idea that you will not
| | 04:42 | find anything about this
in the Excel Help System.
| | 04:44 | I use this all the time.
| | 04:46 | I think it's great.
| | 04:47 | So take a look at it and you'll just
have to remember what you have seen here.
| | Collapse this transcript |
|
|
8. Math FunctionsWorking with rounding functions| 00:00 | A particular problem that many of you
encounter when dealing with information is
| | 00:05 | the fact that sometimes
totals don't quite add up.
| | 00:09 | We are talking about rounding issues,
and there is a huge mistake that some
| | 00:13 | Excel users make and that's doing rounding
off of the ribbon by showing fewer decimals.
| | 00:20 | Now here is a real simple example and
if you were to try what I am about to try,
| | 00:24 | you would say, is he crazy?
| | 00:26 | These numbers here -- and with a
total, we are adding up the numbers.
| | 00:30 | So, no higher math here at all.
| | 00:32 | Nothing unusual about that.
| | 00:34 | You might say, well that would look
better if they were all displayed in
| | 00:38 | the same layout style.
| | 00:39 | So, on the Home tab in the Number group,
common choice here could be if they're $ signs
| | 00:46 | and you probably don't want
dollar signs on everyone, but it certainly
| | 00:48 | wouldn't be wrong to use that.
| | 00:49 | And this automatically gives us
two decimal places, and that's a
| | 00:52 | reasonable display.
| | 00:54 | If you didn't want the
dollar sign, why not the comma?
| | 00:56 | Someone said, I don't want all that
complication, don't show the decimals.
| | 00:59 | Okay, you might try that.
| | 01:03 | But you probably wouldn't
leave it looking like this.
| | 01:05 | It looks like five 5's equals 23.
| | 01:07 | Now what's going on here?
| | 01:10 | Well the total truly is accurate.
However it's certainly not accurate based on
| | 01:15 | the values that are showing.
| | 01:16 | And is that really a five?
| | 01:19 | You can look in the formula
bar and see that it's a 4.6.
| | 01:21 | So, I can imagine anybody
keeping the format looking like this.
| | 01:26 | But to say that we are throwing away
the decimals, and that's the way some
| | 01:30 | people think of this, is just dead wrong.
| | 01:33 | And so what you need to do in a
situation like this would be simply display
| | 01:37 | those decimals, if you want any
kind of coherence in the worksheet.
| | 01:42 | Now this plays out in
different ways with formulas.
| | 01:45 | Here's a formula here that's
calculating a new price for this item, and
| | 01:49 | we're not looking at any
sophistication here necessarily.
| | 01:52 | You can see the formula.
| | 01:53 | It looks like this.
| | 01:54 | And it's all prepared to be copied
down the column, but just a simple little
| | 01:58 | issue might come up.
| | 02:00 | Maybe this is the price of
some office supplier or something.
| | 02:02 | Maybe it's a stapler, box of rubber
bands, and some international company
| | 02:06 | orders 10,000 of these.
| | 02:08 | So, just a simple little formula
out here =10000 times this amount.
| | 02:15 | Well, I can do the math in your head, right?
| | 02:16 | That's going to be 90,000. And you hit Enter.
| | 02:20 | Well, it's not 90,000 and it's
not that much short percentage wise.
| | 02:24 | Well that's $41.68, but that money
has to be accounted for somewhere.
| | 02:29 | It has to go somewhere, or not go
somewhere, and that's a concern.
| | 02:33 | So, what's going on here?
| | 02:34 | Well, first of all let's
jump back to the data here.
| | 02:38 | This could have been
displayed with more decimals.
| | 02:41 | Often you wouldn't do that, but if we
increase the decimals here with this
| | 02:46 | button here in the Number group on the
Home tab, we see that the real answer is this.
| | 02:51 | Now as I do this, the calculation to
the right is not changing in any way
| | 02:57 | and you can see that.
| | 02:58 | So, no matter how any decimals I'm
showing here, we are not seeing any
| | 03:02 | difference in the calculation.
| | 03:05 | So, this is not changing the value at all.
| | 03:07 | It's simply changing the display.
| | 03:09 | And I couldn't think of any better way
to show you how that's when you see it,
| | 03:13 | that sure is obvious and yet some
people will make that mistake of saying, well
| | 03:17 | let's just round this off.
| | 03:19 | Well, it's visual rounding.
| | 03:21 | And in situations like this, imagine
how this might get multiplied across
| | 03:25 | other price items here.
| | 03:27 | So, what do we need to do
here to make this coherent?
| | 03:30 | We need to round this at the formula
level, and the Round function is the one
| | 03:34 | most people are more likely to use.
| | 03:37 | We embed the formula within that and
then we round it based on decimals.
| | 03:42 | Now, if we want us to go to the nearest
penny and that would be $9, we would put
| | 03:47 | in two, two decimal places.
| | 03:50 | And as soon as I hit Enter here,
watch the value in F2 change.
| | 03:54 | Because we're changing this now to be
exactly in this example $9, and the answer
| | 04:00 | changes immediately, and this truly is 9.00.
| | 04:04 | Now, we can share more decimals, not to
change this, but certainly to change the
| | 04:08 | display of it, to see the
real value and there it is.
| | 04:12 | That's the real value.
| | 04:14 | So, we have altered the value
by using the Round function.
| | 04:17 | Now, if you had some scheme in mind
that says well, all of our prices end in nine,
| | 04:22 | you might play a game through this.
| | 04:24 | By putting in 1 here, you are actually
rounding it to the nearest 10 cents and
| | 04:28 | then you could subtract a penny -0.01, if
that's important to you. So that's 8.99.
| | 04:37 | Other examples here, and we don't know
what these are likely to be, but in this
| | 04:40 | situation here, we'll drag it down a few.
| | 04:42 | These are all going to end in nine, if that's
your pricing scheme and that goes with this.
| | 04:46 | Of course, the exact percentage of
increase isn't really 4.36 anymore.
| | 04:51 | But sometimes that's the
pricing scheme or pricing mechanism.
| | 04:54 | Now, at other times what you want to do,
we'll do a couple of Undos here, to
| | 04:58 | knock around to the nearest
values that ends in 9 cents.
| | 05:02 | Sometimes what you want to do with
the situation here is to round in a
| | 05:05 | different direction.
| | 05:06 | The Round function uses standard
techniques and as soon as we reach in this case
| | 05:10 | a half-cent, it goes upward to the next penny.
| | 05:14 | But sometimes you want to force it
upward no matter what, and before doing this,
| | 05:18 | what I want to do is make a copy of
few of these here, just to see what it is
| | 05:21 | using a typical round, and then
we'll see how this might be changing.
| | 05:25 | And the two companion function to
this that override traditional rounding
| | 05:30 | techniques would be ROUNDup.
| | 05:31 | Now that probably won't change this one.
| | 05:35 | It might change the next one. It didn't.
| | 05:37 | It did change this one.
| | 05:39 | And again, we are talking pennies
here, but with similar situations using
| | 05:43 | different rounding capabilities, this
has some potential long-term impact.
| | 05:48 | If we go back for a
second here, I'll do an Undo.
| | 05:51 | And recopy this calculation here.
| | 05:54 | We are talking about 43,400. This is a ROUNDup.
| | 05:59 | Make the next one to be a round up.
| | 06:01 | Well it's $500 difference based on the scheme.
| | 06:04 | And of course, you'd expect the other
variation on this is to use a ROUNDdown,
| | 06:09 | and the easiest thing to remember
here is this is what we do with our ages.
| | 06:12 | So, if you are 39 years and 11 months, there
is 39 and we ROUNDdown to the previous year.
| | 06:19 | In this case, that would be an 8.99 and
again, not necessarily remembering what
| | 06:23 | all these had been but here and there,
these will drop depending upon what it
| | 06:27 | might have been earlier
compared with rounding up.
| | 06:29 | So ROUNDup, ROUNDdown have their roles to play.
| | 06:33 | And if you use a zero by the way
instead of 2, that means round to the
| | 06:36 | nearest whole dollar, and that might be a
more appropriate thing to do here with salaries.
| | 06:42 | In some organizations yearly
salaries and here we are simply showing a
| | 06:46 | calculation where an existing salary is
being upgraded, all these salaries are
| | 06:51 | about to be changed by 4.43%.
| | 06:55 | If this organization decides not to
carry pennies in salary calculations,
| | 06:59 | probably what they would do here is to
use Round, but in this case round zero,
| | 07:04 | if they want to round it to the nearest dollar.
| | 07:07 | So, zero as the number of decimal places,
comma 0 and we see all these would end that way.
| | 07:14 | And you probably wouldn't be
displaying the pennies, but you certainly could.
| | 07:17 | And here too a ROUNDup,
ROUNDdown might make sense.
| | 07:21 | But there is another angle too that
you might not have thought of, and I have
| | 07:24 | seen this in some organizations, just
for ease-of-use, some manipulation,
| | 07:27 | all salaries end in a multiple of a hundred.
| | 07:31 | So, in adjusting these salaries, maybe
we'll just change them to the nearest
| | 07:35 | hundred and that would be -2.
| | 07:38 | Two places to the left of the decimal.
| | 07:41 | And so dragging down,
where is that one going to go?
| | 07:43 | That's going to go down to 69,500,
next one up to 80,100 and so on.
| | 07:51 | And here too, you could imagine the
implications of ROUNDup and ROUNDdown.
| | 07:55 | If we use ROUNDup potentially some of
these could be different than simple
| | 08:00 | entry by going up as much as $99.99, if we use
a ROUNDup and of course there is ROUNDdown too.
| | 08:08 | Another variation on these, and it's a
three whole set of functions is sometimes
| | 08:13 | you need to round the values that
aren't necessarily decimally based.
| | 08:17 | For example, a pricing scheme here
might say let's just round these and then go
| | 08:21 | to the go to the nearest
nickel, the nearest five cents.
| | 08:25 | In a certain description of that, you
might say, wasn't that a multiple decimals?
| | 08:28 | Well, possibly.
| | 08:29 | But let's just make this simpler.
| | 08:31 | Instead of using a ROUNDup or
ROUNDdown, what if we use mround?
| | 08:36 | This works a little bit differently.
| | 08:37 | We want to take this calculation here,
and round it to the nearest 0.05,
| | 08:43 | the nearest nickel.
| | 08:44 | In this case, it's probably going to
be $9 again, but another example below
| | 08:49 | this here, that's probably going to go
up to 35 and you can sort predict based
| | 08:53 | on what the entries might have been
previously, up or down to the nearest five cents.
| | 08:58 | We can see that here.
| | 09:00 | And its corresponding companions to
ROUNDup and ROUNDdown are not as you might
| | 09:05 | expect mround up or mround down, but
you may go upward. How about this?
| | 09:11 | ceiling.
| | 09:14 | It's going to go up to the next penny, so on
some of these, they are going to change a bit.
| | 09:19 | They haven't yet but
that one went from 10 to 15.
| | 09:23 | And sure enough, if you know ceiling,
you know it's opposite. If we want to do
| | 09:27 | the equivalent of a ROUNDdown
when it's not decimally based.
| | 09:30 | Here it's going to be Floor, same idea.
| | 09:35 | Two other functions of note, INT.
| | 09:37 | You may have seen INT.
| | 09:39 | This simply ignores
everything to the right of decimal.
| | 09:42 | I doubt if we would be
using it in examples here.
| | 09:45 | Possibly we could've used it with salaries.
| | 09:47 | You might want to take this
calculation. INT means integer.
| | 09:51 | And we are not talking about the nearest.
| | 09:53 | We are simply going to ignore.
| | 09:55 | In this case, we ignore
everything to the right of the decimal.
| | 09:59 | And who knows whether this is going up and down?
| | 10:01 | We need the previous reference, but INT
simply and that could have been the choice here.
| | 10:06 | It simply drops the pennies. Just drops them.
| | 10:10 | That's it.
| | 10:11 | And a similar function called Trunc,
short for truncated, works exactly the same
| | 10:17 | unless you've got negative data.
| | 10:20 | And the details are not worth
talking about now, but if you ever have to
| | 10:23 | strip-off decimally based data,
usually it's going to be INT.
| | 10:28 | But if you have got
negatives, possibly INT or Trunc.
| | 10:32 | And one other obscure one I just want
to throw it in here. I doubt if we are
| | 10:37 | going to use this. If you ever have
a set of entries and you want to change
| | 10:40 | them by rounding them up to the next
odd number, or the next even number.
| | 10:45 | So, here are some values here.
I'll just do these all at once.
| | 10:47 | One is Odd already, but suppose we want
to take these to the nearest odd number,
| | 10:52 | and I think I would use this once.
| | 10:54 | Not that I am the judge of how often
you'll use it, but nevertheless we see
| | 10:57 | here what's happening.
| | 10:58 | This takes us up to the next odd
number, and similarly there is a function
| | 11:02 | called Even that does the same kind of thing.
| | 11:05 | We'll just use it here real fast, =even.
This will take us up to the next even
| | 11:10 | number in all these cases here.
| | 11:13 | So, lots of functions for doing
rounding. Keep the idea of the round function.
| | 11:17 | I think for most people is going to be
90% of what you do, if you need this kind
| | 11:21 | of feature, but just don't make that
mistake of adjusting information with these
| | 11:26 | buttons and think that you're
really rounding, because you're not.
| | Collapse this transcript |
| Finding the remainder with MOD| 00:00 | Among the many functions in Excel is a
mathematical function called MOD, and
| | 00:05 | many people when they see the
description of this, they are likely to say, so what?
| | 00:09 | What's the big deal?
| | 00:10 | How would I ever use this, =MOD,
what is this all about, MOD?
| | 00:15 | It derives from the word module and
that's not necessarily very helpful.
| | 00:20 | Its purpose is to calculate the
remainder in a division and again, that doesn't
| | 00:25 | give you a good reason for using it.
| | 00:27 | But here's a simple little example
where I choose-- I'm going to show you
| | 00:30 | another example as well.
| | 00:32 | You got a bunch of items.
| | 00:33 | Maybe these are warehouse type
items and you're closing up shop in an
| | 00:37 | organization and you got a bunch
of items, and you got 162 of these.
| | 00:41 | You want to put them back in their original
container box and you can get 16 per box.
| | 00:46 | Now if you do this for your various
items, you're going to have some left over.
| | 00:50 | So how would you do the calculation here?
| | 00:52 | Divide 162 by 16, you'll
get an answer. It's 10.
| | 00:55 | You're going to have remainder of 2.
| | 00:57 | How many items you're going to
have left over after packing?
| | 01:00 | So =mod and we don't put in a
division symbol or anything.
| | 01:07 | We just indicate the value that we're
looking at, comma and essentially the
| | 01:12 | divisor and the answer
we get here is the remainder.
| | 01:16 | With most of these, you could probably
do the math in your head and so on, but
| | 01:19 | you'll quickly see the answer here
as we copy this into other cells by
| | 01:23 | double-clicking that fill handle.
| | 01:25 | So here, the same general idea.
Depending upon the item and different
| | 01:29 | number of items in each.
| | 01:30 | That one has got a huge number.
| | 01:32 | If that were 144, then we'd have 0 here.
| | 01:37 | As we do in this one,
because this is evenly divisible.
| | 01:40 | 24 times 7 is 168, and we get none
left over here and you see the result.
| | 01:46 | So here and there,
there's that kind of application.
| | 01:49 | Another one I use this for is a
situation where I've got a database, maybe
| | 01:54 | something like this or maybe
something much, much longer, and for ease of
| | 01:58 | readability, I'd like to have every
5th row, every 7th row, every 10th row, to
| | 02:03 | be a different color.
| | 02:05 | A number like 5 or 10 probably makes more sense.
| | 02:07 | Some people might find 2 okay as well.
| | 02:10 | And we're not taking about using a
table feature in Excel, which is another way
| | 02:13 | to do this, if you simply wanted
every other row to be highlighted.
| | 02:17 | Just select the entire
worksheet here and use a feature called
| | 02:21 | Conditional Formatting.
| | 02:22 | So on the Home tab, Conditional
Formatting, and let's create a new rule here.
| | 02:27 | That's a great feature by the way
if you haven't looked at Conditional
| | 02:30 | Formatting, lots of colors and options,
but how about a new rule here using this
| | 02:35 | Mod function, a new formatting rule?
| | 02:38 | Use a formula to determine which cells
to format, and the formula will be =mod(,
| | 02:45 | and another function you might not
have used called ROW, and we actually want
| | 02:54 | every cell in this worksheet in effect
to be looking at this formula, and each
| | 02:59 | cell in effect is going to
be looking at its row number.
| | 03:02 | By the way, that's two parenthesis.
| | 03:04 | It sort of looks like a football there.
| | 03:05 | It's an open and closed parenthesis.
| | 03:07 | We will consider for every given
cell, its row number and then ,5.
| | 03:14 | In other words, we want to divide the
row number by 5 and if that remainder is 0,
| | 03:20 | that means it's row 5,
row 10, row 15, etcetera.
| | 03:24 | So in those cases, when the division
of the row number by 5 gives us a 0,
| | 03:29 | we want to use a special format and the
more obvious one would be, although it can
| | 03:34 | be any combination of Font, Border and
Fill colors, I'll just use green here.
| | 03:40 | Click OK, click OK, and every fifth row
is green, and you can imagine having fun
| | 03:46 | with that using different
numbers and other combinations.
| | 03:49 | And if we happened to delete some rows,
and I'll just delete these, this will
| | 03:53 | automatically readjust and every fifth
row would be green, and of course,
| | 03:57 | it will not be matching up with the
numbers that we're currently seeing being
| | 04:00 | green as I delete these.
| | 04:02 | So that may not be the world's most
important news, but on the other hand,
| | 04:05 | it does illustrate how this MOD function,
and I am sure, mathematicians who have a
| | 04:10 | little more creativity using functions
like this, but the two examples here I
| | 04:15 | think you can see there is some
real value with the MOD function.
| | Collapse this transcript |
| Building random number generators with RAND and RANDBETWEEN| 00:00 | The ability to create random numbers
might seem like an obscure need for
| | 00:04 | many people using Excel.
| | 00:06 | It's a mathematical function and
it's a great mathematical tool.
| | 00:10 | And the word random has different
meanings for different people, but let's give
| | 00:13 | you two examples of how you might
want to use this particular capability.
| | 00:17 | We're talking about two functions here.
| | 00:19 | The first one is RAND, =rand and its
purpose simply in an isolated case is to
| | 00:27 | create a random number between 0 and 1.
| | 00:29 | I am just going to put it out here in
the middle of nowhere for the moment, =rand.
| | 00:32 | It's one of these functions that has
parentheses but nothing between the
| | 00:36 | parentheses, just type it like that,
Enter, and depending on how many decimals
| | 00:41 | you've got displayed here, it's a
random number between 0 and 1, and so that's
| | 00:46 | not really giving us
much rationale for using it.
| | 00:49 | Now, here is a list of data. It's a database.
| | 00:52 | It currently looks like
it's sorted by department.
| | 00:54 | There are times when you've got a list.
| | 00:56 | Now it doesn't necessarily have to
be an HR list like this might be.
| | 00:59 | It could be a list of items.
| | 01:01 | It could be a list of sales.
| | 01:03 | Sometimes what you want to do is sort of
a primitive version of quality control.
| | 01:08 | You simply want to pull out some of
these rows at random to review them, to see
| | 01:12 | if the information has been processed,
and it could be almost any kind of data.
| | 01:16 | So how might you randomize this list?
| | 01:19 | Well, we've got an empty
column to the right here.
| | 01:21 | Simply put in =rand here,
left parenthesis, Enter there.
| | 01:26 | You probably want to display at least
something so you know that's not wrong there.
| | 01:29 | So we could show a few
decimals just to see what it is.
| | 01:32 | Double-click to copy this down the
column and use this as a vehicle for sorting
| | 01:37 | the data, and to make it fall into
place pretty quick here, give it a temporary title,
| | 01:41 | practically anything.
| | 01:42 | Just qq or whatever. That's okay.
| | 01:45 | By the way, you may have noticed there.
| | 01:46 | The numbers have all changed.
| | 01:48 | This is one of those functions that
adjusts every time you make a worksheet change.
| | 01:52 | Now I could click over here and type in a
number and hit Enter and they all change again.
| | 01:56 | We're not going to let that
bother us. Just leave this here.
| | 01:59 | But if we use this as our sorting
vehicle and the fastest way to do this,
| | 02:04 | since it is adjacent to all of this data and
this is not associated with the data to the right.
| | 02:08 | This is an empty column.
| | 02:10 | We could simply click the Data tab,
hit the AZ or ZA button and it sorts
| | 02:16 | the entire list and now as you look at this
list, it is in no apparent order whatsoever.
| | 02:22 | And in fact, the numbers that it was
based on that were here got all changed
| | 02:27 | again, and anytime you make a
worksheet change, these change.
| | 02:31 | Now we don't care about these numbers anymore.
| | 02:33 | This list is in random order, and
so we could throw away the numbers.
| | 02:38 | Maybe if we needed to do a spot
check of 10 of these, we'll just pick the
| | 02:42 | first 10 and go at it.
| | 02:44 | Review those and no others.
| | 02:46 | Another approach to this could be
something a little bit different.
| | 02:48 | We might just type in an entry here, =rand().
| | 02:55 | If for example, we wanted to do
10% of these, how about =rand()<10%?
| | 03:02 | Type that and we're going
to get true or false.
| | 03:04 | Double-click to copy this down the
column and 10% of these are true roughly.
| | 03:09 | The others are false.
| | 03:10 | So we could just freeze those if we
wanted to, and then sort that way.
| | 03:14 | That's a little more obscure and
probably not as likely to be used, but
| | 03:17 | again, another use of it.
| | 03:19 | So eventually or at least, all
of these are in random order.
| | 03:21 | You'll decide what to do with them, but
eventually, you would get rid of this column.
| | 03:27 | A companion function of this, which I
find useful because I prepare a lot of
| | 03:31 | sample data and am forever adjusting it.
| | 03:34 | In a real business-like environment,
you're probably not going to use in the way that I
| | 03:37 | might use it here, but for purposes of
a certain example, I need some random
| | 03:41 | numbers in here, and not numbers
between 0 and 1, but numbers that are relevant
| | 03:47 | to the context in question.
| | 03:49 | And so I'm tabulating. It might be sales.
| | 03:52 | It might be well ratings.
| | 03:54 | It could be anything, but the
values here typically are between,
| | 03:57 | for example, 100 and 700.
| | 04:00 | So here's a function called RANDBETWEEN.
| | 04:03 | So RANDBETWEEN, and this
deals with whole numbers.
| | 04:08 | RANDBETWEEN, a lower value first, a
higher value next, and since these are all
| | 04:16 | highlighted ahead time, I'll just
hit Ctrl+Enter and we'll adjust the
| | 04:21 | formatting kind of quickly on the Home tab here.
| | 04:23 | Just hit Comma, and don't
show those decimals, there we go.
| | 04:27 | We have got some whole numbers, and
they too will change every time you make
| | 04:31 | a worksheet change.
| | 04:32 | Here and there with smaller sets of data,
I've had situations where I didn't
| | 04:35 | like the numbers, and so you
can quickly regenerate them.
| | 04:38 | I doubt if you need that here.
| | 04:39 | Just by hitting F9, it will do a
recalculation, and they all change.
| | 04:43 | Some people could figure out a way to
pick the lotto numbers maybe and don't like them
| | 04:47 | and they'll change them.
| | 04:48 | But if you did want these to freeze
at some point, you can simply with the
| | 04:52 | right-mouse button, drag these into
another set of cells and immediately right
| | 04:56 | back on top of the current ones,
like when Copy Here as Values Only.
| | 05:00 | So here and there, creating quick
random data for samples, that's easy.
| | 05:05 | RANDBETWEEN, and if you wanted to
have a series of dates here, for the same idea,
| | 05:12 | between those two
dates, that's 2010 and 2011.
| | 05:16 | That's two years of data there.
| | 05:17 | Here we could do simply =randbetween,
a starting date, an ending date, and we do
| | 05:27 | want these to be absolute here, so we'll hit F4.
| | 05:32 | We've got a bunch of random dates, and
for the moment, those too will change,
| | 05:35 | and so if you want to
freeze them, the same idea.
| | 05:38 | There are obviously some uses here
well beyond the mathematical concept of a
| | 05:42 | random number that might have some value,
as you work with data, and either need
| | 05:47 | to sort data in a random way or
possibly create some sample data quickly.
| | Collapse this transcript |
| Converting a value between measurement systems with CONVERT| 00:00 | If you deal with scientific data in
Excel, you should probably know about
| | 00:04 | the CONVERT function.
| | 00:06 | Now some of the applications that we
are going to be using there are quite common.
| | 00:09 | Even if you're not in the
scientific arena, I think they are going to
| | 00:12 | be helpful for you.
| | 00:13 | And in Column G and H,
you'll see a few of these.
| | 00:16 | If you check out the Excel Help System,
you see quite a few others as well.
| | 00:20 | The categories I have shown here
Temperature, Liquid, Measure, etcetera are more
| | 00:24 | commonly used but you will also see a
set of conversion issues related to power,
| | 00:28 | pressure, force, energy and magnetism,
but let's just give you a couple of
| | 00:33 | examples of how this might work.
| | 00:34 | You want to convert kilometers to miles, so
in cell B2, we'd use the CONVERT function.
| | 00:39 | Many times when you make a mistake
with the issues here, it has to do with
| | 00:42 | upper and lower case.
| | 00:44 | So the titles as you see them here,
and I wouldn't normally setup titles this way
| | 00:48 | but I am in this
case to extenuate this idea.
| | 00:51 | Here's the value of 180.
It refers to kilometers. Comma.
| | 00:56 | We are converting from what? "km", and
we are trying to convert to miles "mi".
| | 01:07 | So 180 kilometers is 111.8 miles.
| | 01:11 | And certainly from time to time,
you would want to do the opposite, so in
| | 01:14 | the case here a CONVERT from these miles
into how many kilometers, same general idea.
| | 01:20 | And here too having seen the first
example, you would know what to do.
| | 01:24 | That's the unit of measure,
and it's in miles "mi,".
| | 01:27 | We want to convert to kilometers
"km," we are all set. There we go.
| | 01:33 | 143.2 kilometers is the equivalent of 89
miles. And then Celsius and Fahrenheit.
| | 01:43 | And here I have capitalized the two
words to extenuate the idea that we will be
| | 01:47 | using the letters upper case C and
upper case F. Aame general idea here as we
| | 01:52 | convert, and in this case this is
the temperature, "C", "F." 98.6 is the
| | 02:07 | Fahrenheit equivalent to 37 degrees
Celsius and looking the reverse way here is
| | 02:11 | the Fahrenheit of 90, what is that in
Celsius? Same general idea, =convert.
| | 02:19 | The value in question here is 90. So =convert.
| | 02:24 | This time I can put it in the cell.
| | 02:25 | You can of course do this with real
values this way and this time I will be typing.
| | 02:28 | I am just going to click on it, E3 comma,
moving from Fahrenheit in this case to Celsius.
| | 02:37 | And one more. The same general idea and
here too I have not used capitalization
| | 02:41 | to extenuate the idea, 100
meters, how many feet is that?
| | 02:44 | We are converting from meters "m",
into feet, and this time ft.
| | 02:54 | How many feet is that?
| | 02:57 | Here we go. 328 feet.
| | 03:00 | And of course this is a mile as we know it.
5280, how many meters in a mile, or
| | 03:05 | how many meters in this many feet?
| | 03:09 | And that's in cell E8 and we
are moving in this case "ft", "m".
| | 03:20 | So 1609.3 feet in a meter. You get
the general work idea. It works smoothly.
| | 03:25 | There are tons of options. The ones
being displayed over in columns G and H are
| | 03:29 | perhaps a third to less than a half
of the possibilities and you want to
| | 03:33 | explore that a bit more.
| | 03:34 | It also allows for various prefixes and
we actually use them here for example,
| | 03:39 | the K in front of M is kilometers and so on.
| | 03:42 | There is a complete list of
prefixes you can use as well.
| | 03:45 | So anytime you got data that's in
varying measurement indices, you might want to
| | 03:51 | if necessary convert them into another
measure by using some of the techniques
| | 03:55 | and options available with the CONVERT function.
| | Collapse this transcript |
|
|
9. Array Formulas and FunctionsExtending formula capabilities with Arrays| 00:00 | No matter how adept you are at using
Excel formulas and functions, there are
| | 00:04 | likely to be times when you
are going to hit a brick wall.
| | 00:07 | You're trying to come up with a
formula and you just can't make it work to
| | 00:11 | tabulate some information you trying to get at.
| | 00:13 | Starting with a simple example here,
in columns B and C and D, you see
| | 00:19 | information about some items and
simple multiplication formulas in column D
| | 00:24 | are showing us the total for this
order. The units sold times the unit price,
| | 00:29 | simple formulas.
| | 00:30 | We're adding these up to get a grand
total for this particular set of orders.
| | 00:35 | There are times when you don't
necessarily need the interim information.
| | 00:40 | The important number coming out
of here might be this total.
| | 00:44 | So how can we get here in a different
kind of way? One thought might occur to
| | 00:49 | you that you would like to say,
let's multiply those two and then those two and
| | 00:53 | then those two, and why
don't we just do this all at once?
| | 00:57 | Why can't we say =sum?
| | 00:58 | Let's add up every one of these, times
every one of those, meaning of course
| | 01:06 | B2*C2 and then B3*C3
and so on and so on and so.
| | 01:11 | And if you try this and complete the
entry, you're going to be disappointed
| | 01:15 | because it does not work and
you might just give up there.
| | 01:19 | Now an Array formula in essence
allows us to perform actions across
| | 01:24 | entire ranges of cells.
| | 01:26 | It's not exactly a definition but the
more examples you see, the more you'll see
| | 01:30 | what these often have in common as we
are trying to deal with information out
| | 01:35 | separate columns or of separate rows,
often in a parallel kind of situation.
| | 01:40 | Now looking at this formula again, this
will work if you complete the entry not
| | 01:46 | simply by hitting Enter but by
pressing the combination Ctrl+Shift+Enter.
| | 01:52 | Now that's the same answer here.
| | 01:55 | By the way look in the Formula bar, you
will notice that the formula is in braces.
| | 01:59 | It's the same answer we see in D11 but
D11 is the total of the products that we
| | 02:06 | saw earlier. The formula in
C13 does everything all at once.
| | 02:11 | Now if you start to edit this or you
want to make an adjustment to it, if you
| | 02:15 | click either in the Formula bar or you
hit F2 in the cell, you don't see the
| | 02:19 | braces and you don't type the braces.
| | 02:22 | And I haven't joked about how it sounds
as if I'm making this up as I go along.
| | 02:26 | Here's the formula.
| | 02:27 | You see it in the Formula bar.
| | 02:28 | It's embedded in braces.
| | 02:30 | They will not appear there unless you press
Ctrl+Shift+Enter and when you edit the cell,
| | 02:35 | you don't see them, and a common
mistake when you're working with these
| | 02:39 | and if you with work them only rarely,
you will make this mistake often.
| | 02:42 | You'll be editing here to trying to adjust it.
| | 02:44 | You are going to press Enter,
instead of Ctrl+Shift+Enter.
| | 02:49 | For this first example of an Array
formula, this particular function it wasn't
| | 02:53 | necessary to use an Array formula
because for situations like this, since they
| | 02:57 | are more common than other array
formula situations, there is a separate
| | 03:01 | function you might want to know about
called SumProduct and you could say it's
| | 03:07 | a built-in variation on an Array
formula that does allow us to take one set of data,
| | 03:12 | comma in this case, not the
asterisk and then another set of data,
| | 03:16 | potentially others as well,
and just a simple Enter here.
| | 03:19 | We get the same answers as
we got in the other cases.
| | 03:22 | So SumProduct is a unique variation on
the idea of an Array formula but it has
| | 03:27 | its own separate function.
| | 03:28 | So let's look at another situation.
| | 03:31 | You'll see in column F and G in
Order Date and the Shipping Date,
| | 03:35 | what's the elapsed time here.
| | 03:37 | Well, you can see there it's what 11
days and here it's quite a few more days.
| | 03:40 | We don't necessarily have to know that.
| | 03:42 | We might well know the average elapsed
time of these orders and certainly as in
| | 03:47 | the previous example we
could tabulate that here.
| | 03:50 | It would be a subtraction.
| | 03:51 | We could take this date minus this date
and do that for the rest of the column
| | 03:56 | and so on but let's just cut to the chase
here and put in an Array formula right here
| | 04:01 | where we would like to take all of the
shipping dates minus all the order dates
| | 04:05 | and come up with the average elapsed
time equal average, left parenthesis,
| | 04:11 | the shipping dates in mass minus the Order Date.
| | 04:15 | We are all done, Ctrl+Shift+Enter.
Average 17.17 days. Rather than providing all
| | 04:24 | of the interim detail that we
sometimes don't want or need.
| | 04:28 | Now let's scroll to the right here and
look at information in columns M, all the
| | 04:32 | way out into column V. We don't have
to necessarily see all those columns but
| | 04:36 | there is data out there all the way across.
| | 04:39 | Now a great feature in Excel 2007,
and much easier to use than in prior versions
| | 04:44 | is we might have discovered in looking
through the data here that we got a duplicate.
| | 04:49 | Now here's one we see right here and
that jumps out at us and you know how it is
| | 04:54 | when you see these manually and say, wow!
| | 04:56 | Glad, I found not one, but then you
begin to worry about how many others you
| | 04:59 | might have and then Excel 2007 you can
certainly get rid of these pretty readily
| | 05:04 | with that great feature under Data
Tools in that group of the Data tab in the
| | 05:08 | Ribbon called Remove Duplicates.
| | 05:10 | But it's very important sometimes to
know which records were duplicated and I
| | 05:16 | wrote a formula ahead of time and I put
it here because you don't want to watch
| | 05:19 | me typing this and I
don't want to type it again.
| | 05:22 | But here it is and it's
about -- you will see it here.
| | 05:26 | This formula is comparing cell by cell,
from column M into column V to see if M3
| | 05:35 | and M2 have the same data in it and does
N3 and N2, column by column all the way
| | 05:41 | up in to column V. When all
of these comparisons are true,
| | 05:47 | we have got a duplicate
record. That's the answer.
| | 05:49 | When any one of them is different,
we do not have the duplicate record.
| | 05:52 | So in this case here that's a unique
entry and just dragging this down far
| | 05:57 | enough to catch that duplicate down here. Oops!
| | 05:59 | There we go.
We've got a duplicate.
| | 06:02 | Not only are those two the same, but
these two are the same and so on and so on
| | 06:06 | and so on all the way across.
| | 06:07 | Now that's a pretty long formula and
you know you are going to make a typing
| | 06:11 | mistake when you do that.
| | 06:12 | But let's recast it now and think of it
in terms of what we might be able to do
| | 06:17 | with an Array formula.
| | 06:19 | We want to take all the cells
in row three from M3 over to V3.
| | 06:24 | So let's change this
part of it here to be M3:V3.
| | 06:31 | We want to check all the cells in row
three to see if they are equal to all the
| | 06:35 | cells in row 2, and that's going to
M2:V2 and we don't need any of these
| | 06:44 | information of to the right
here, much, much, much shorter.
| | 06:50 | If all those comparisons are true,
we have got a duplicate record.
| | 06:53 | If not, it's unique. And what did I forget
to do there? And I didn't do it on purpose.
| | 06:58 | I forgot to hit Ctrl+Shift+Enter.
| | 07:01 | So once again Ctrl+Shift+
Enter. This is an Array formula.
| | 07:07 | Drag this down a few cells just to check it out.
| | 07:10 | We got two duplicates there on the
screen and in the remainder of the list,
| | 07:13 | perhaps a few more, because
down about 700 rows or so.
| | 07:17 | So a much, much shorter and much
more easy to read function and when it's
| | 07:23 | certainly gets the job done quickly and
easily, an Array formula is the correct way
| | 07:27 | to say this and once again,
we don't see those braces.
| | 07:30 | We don't type them.
| | 07:31 | We hit Ctrl+Shift+Enter, they are in
place and the formula works and it saves us
| | 07:35 | a ton of time in building a
formula and it gives us our answer too.
| | Collapse this transcript |
| Counting unique entries in a range with an Array formula| 00:00 | You might imagine that there is a
function in Excel to tabulate the number of
| | 00:04 | unique entries within a range.
| | 00:06 | But there isn't, and I wish, well,
there should be a function called Unique.
| | 00:11 | Still there is a way to get to this
capability by way of an array formula.
| | 00:16 | And this is one of the stranger array
formulas, and yet I don't mean strange in
| | 00:20 | the sense that you'll never use it.
I think you might use it a lot.
| | 00:24 | I know I have and I remember when I
first started using this, I did not
| | 00:27 | understand how it worked,
but I knew that it worked.
| | 00:30 | And so, let's go down that same path and set
up the situation where you need to know this.
| | 00:36 | This set of data here has quite a few
rows in the hundreds and you will see that
| | 00:40 | it's sorted by department.
| | 00:42 | Question just comes up, how many
different departments do we have here?
| | 00:45 | In other words, how many unique
entries do we see over there in column B?
| | 00:50 | Well, here's the formula and then
we will backtrack and give you some
| | 00:52 | explanation of it, =sum and this
will be an array formula, (1/(count if(.
| | 01:07 | Do not use column references here.
| | 01:09 | Use the actual cells.
| | 01:10 | Now, you don't necessarily have to
drag through them if you know that this
| | 01:13 | goes down so many cells.
| | 01:15 | Maybe in this case I will forget how
many I have had on purpose here and
| | 01:17 | just drag through them.
| | 01:19 | Next time I will remember maybe.
| | 01:20 | So how many cells do we have here? Okay, 687.
| | 01:25 | Comma, and rather then dragging in
I will just copy this all over again and
| | 01:31 | put it there, and make our parenthesis match up
and this is an array formula, Ctrl+Shift+Enter.
| | 01:46 | There are 24 unique entries in the data
from B2 down to B687, and that's great
| | 01:53 | and now, do you need to explain this
to somebody else? Maybe you don't.
| | 01:55 | You are happy. You move on.
| | 01:58 | Something has caught my
eye and perhaps yours too.
| | 02:01 | In column B, if you're looking at the
Admin Trainings down at Row 21, it looks
| | 02:06 | like someone forgot a space down here.
| | 02:09 | So the 24 entries, then it's probably off.
| | 02:11 | Let's readjust this one.
| | 02:12 | Put in a space there to make it match up with
the others. Could have copied the other one.
| | 02:17 | Now it's down to 23.
| | 02:20 | But looking at this, how would you ever
reach to conclusion this is the way to go?
| | 02:23 | Let me give a little bit of background in this.
| | 02:26 | Simple little example
here, here is some entries.
| | 02:28 | You see there are the states there,
and of course some of them are repeating.
| | 02:32 | How many times does Colorado appear here?
| | 02:35 | You can imagine using this function.
| | 02:36 | It's quite commonly used.
| | 02:38 | Count If, compare Colorado here, or
actually we are looking in this range.
| | 02:42 | We are looking at Colorado, and we are
looking at the range here, and how often
| | 02:49 | does Colorado appear there?
| | 02:50 | If we are going to be copying this down
the column then we should also make this
| | 02:54 | an absolute reference,
highlight it and hit Function key F4.
| | 02:58 | It's an absolute reference.
| | 03:00 | Colorado appears there four times.
| | 03:02 | We will double-click and doing this little
exercise doesn't seem to be taking us very far.
| | 03:07 | We see it again Ohio is there three times.
| | 03:10 | There is Colorado again.
| | 03:11 | It's there four times.
| | 03:12 | Now, a simple division will send us
on the path to possibly understanding
| | 03:16 | the array formula here.
| | 03:18 | What if we simply make this be the
denominator, the reciprocal as it's called.
| | 03:21 | 1/count if, do that and recopy these.
| | 03:28 | Now what we have here, this is one
quarter of all the Colorado entries.
| | 03:33 | This is a quarter of all the
Kentucky entries, a fifth of the
| | 03:36 | California entries, and so on.
| | 03:38 | And if we highlight all these
together, what's the total of that?
| | 03:41 | And we see at the bottom of
the screen, it adds up to 4.
| | 03:44 | We have got four unique entries.
| | 03:47 | So as we look at this and this is
looking more like what we had seen earlier,
| | 03:52 | make a slight change here, put the sum
in front of this and instead of doing
| | 03:58 | this just for these cells, in the small
example we have got here, we essentially
| | 04:02 | want to take this comparison here and
copy it and make it be repeated here.
| | 04:08 | And this is essentially the same kind
of formula that we saw in I2 previously.
| | 04:13 | And we will match up our parenthesis
one more out here, and this time we will
| | 04:17 | hit Ctrl+Shift+Enter and there is the answer.
| | 04:20 | There are four unique entries in this list.
| | 04:23 | You don't necessarily need to go into
explaining it, but in this case, if you
| | 04:27 | want to make some sense out of an array
formula sometimes you got to do things like that.
| | 04:31 | I have used this many, many times.
| | 04:33 | Here and there I forget it. I try it again.
| | 04:35 | It's great. It comes in
handy in a lot of situations.
| | 04:38 | It doesn't give you the list,
but it gives you the result.
| | 04:41 | It's a specialized use of an array formula.
| | Collapse this transcript |
| Determining frequency distributions with FREQUENCY| 00:00 | Creating a frequency distribution in
Excel is something many an Excel user needs,
| | 00:05 | and it does involve an array
function, not an array formula that you
| | 00:11 | might need to create on your
own, but an array function.
| | 00:14 | And the function called
Frequency is an array function.
| | 00:18 | Even if you're not a statistician,
you're probably familiar with the idea.
| | 00:21 | A list of entries in this worksheet,
about 620 or so, by Social Security and
| | 00:26 | salary, of how many people in this
organization fall into the various
| | 00:30 | categories based on an arbitrary
list that you might set up anywhere.
| | 00:36 | A common approach might be something
like let's just put down the salary
| | 00:39 | breakout here, 10,000, 20,000 and so on.
| | 00:43 | So the number we would be seeing here
would be the number of salaries up to
| | 00:47 | and including 10,000.
| | 00:49 | And then here we'll see all the salaries
above 10,000 up to and including 20,000
| | 00:53 | and so on and so on and so on.
| | 00:55 | We just want a rough count of how many
people fall into each of the categories here.
| | 01:00 | The initial process for creating a
frequency distribution is to set up a list
| | 01:05 | usually in a column anywhere you want.
| | 01:08 | This is referred to as a Bins list.
| | 01:11 | Now, the salaries in question are over here.
| | 01:13 | But we also want to setup a set of cells,
a range where we are going to put the
| | 01:18 | answer and here we are
going to type =frequency.
| | 01:22 | That's the function name. Left parentheses.
| | 01:27 | Data array, which data
are we talking about here?
| | 01:29 | It's all the data from here downward.
| | 01:31 | Wile you are doing this by the way,
| | 01:33 | you can hit Shift+Ctrl+Down
arrow to highlight those cells.
| | 01:37 | There we go, and you see
what's happened in the Formula Car.
| | 01:40 | You might want to scroll back again. Comma.
| | 01:43 | Now what? The bins array.
| | 01:45 | So scrolling back up top here, we are
going to highlight these cells and that's
| | 01:50 | all we need, but this is an array
function, so we'll press Ctrl+Shift+Enter.
| | 01:56 | There's our answer right there.
| | 02:00 | Then you discover as you look at this
cell and this cell, they appear to have
| | 02:04 | exactly the same function in each
one and they do and yet we're getting
| | 02:09 | different answers and that's a
little bit unsettling at first.
| | 02:12 | But these answers are correct and a
quick search of the data here, a quick
| | 02:17 | sorting would actually
make some sense out of it.
| | 02:18 | For example, just click here and
on the Data tab just hit AZ here.
| | 02:23 | Well, sure enough, what have we got here?
| | 02:25 | 4 salaries here, up to an equal 10,000,
there they are and we could to the same
| | 02:29 | thing with the next range,
this cluster right in here...
| | 02:32 | We're going to have about 32 of those. There we go.
| | 02:33 | You see the number 32?
| | 02:35 | So you have got 32 of those
and so on and so on and so on.
| | 02:38 | Sometimes what you want to do with this
is turn this into a chart real quickly.
| | 02:43 | It'll work most efficiently if you
display these as text, so a real fast entry here,
| | 02:47 | if simply using the
text version of those numbers.
| | 02:50 | It's just a faster way to do some of
things we need to do from time to time.
| | 02:54 | This is not an array formula here.
| | 02:56 | It's just a simple conversion of this
information here into a text layout that
| | 03:01 | matches a format for example,like this
and there are a quite few variations, on
| | 03:04 | which you might try with
this particular format. Okay.
| | 03:09 | If we were to highlight this in Excel
2007, just like Alt+F1 and we'll have a
| | 03:13 | nice chart to go along with our data as well.
| | 03:16 | Probably we want to clean up the bottom
of that, take out the legend and so on,
| | 03:19 | but a frequency distribution often
seems to be accompanied by a chart.
| | 03:23 | It just makes things easier to see
and that mirrors the data that we are
| | 03:26 | seeing there in column F.
| | 03:28 | So Frequency is a function, but it's an
array function and once again, clicking
| | 03:32 | back on one of the cells here, you look
in the Formula Bar, you see the braces,
| | 03:36 | you do press Ctrl+Shift+
Enter to complete the entry.
| | Collapse this transcript |
| Flipping row/column orientation with TRANSPOSE| 00:00 | In Excel, there's a great
feature called Transposing.
| | 00:03 | And I find myself using it many
times when I am laying out data.
| | 00:07 | I will often pause and consider whether
I should have put data, like we are
| | 00:10 | seeing on the screen here in a
vertical alignment with the months down the
| | 00:14 | left-hand side of the screen and
Sales, Expenses, Profits across the top.
| | 00:18 | And so looking,at this data, what I
would like to do is transpose it and
| | 00:21 | it's somewhat analogous to things you might
be familiar with when using a PivotTable.
| | 00:25 | But if you could imagine a diagonal
line along here, maybe transpose this
| | 00:29 | without destroying it and not using a
function just yet, but simply copying
| | 00:33 | this data and then, right below it
for contrast, right-click here, Paste
| | 00:38 | Special and Transpose.
| | 00:41 | Not only is it the same data, but after
adjusting the column widths here,
| | 00:44 | we'll see that the formulas
themselves got transposed.
| | 00:47 | So a formula right here, which is
adding up 6 cells to it's left, does get
| | 00:52 | transposed into a formula here
that's adding up the 6 cells from above.
| | 00:57 | And usually in situations like this
and sometimes you'll be doing this with
| | 01:00 | only a single row or a single column,
you make your decision as to which one
| | 01:04 | looks better and get rid of one of
them and keep the other one and proceed.
| | 01:09 | There can be other times when what
you would like to do maybe a set up
| | 01:13 | something like this and maybe on
another worksheet, and have the two sets
| | 01:18 | of values be in sync.
| | 01:19 | In other words you might want to
have this be kind of a mirror image in a
| | 01:23 | different worksheet and have it
be actually linked to the data.
| | 01:27 | When you do a simple copy and transpose,
a change up here causes nothing down here
| | 01:33 | and as I change this to 150,
this set of data in the upper part of the
| | 01:37 | screen here is changing
but not in the lower part.
| | 01:40 | So, if you want them to be in sync
and you need that kind of a situation.
| | 01:44 | What you need to set up is what's called the
Transpose function and it is an array function.
| | 01:52 | So getting rid of the data here, and
doing it on the same worksheet, so you can
| | 01:56 | see the example better.
| | 01:58 | Let's setup a transposed area and
here's what we have to do first.
| | 02:02 | If you drag across starting area here,
as you do this, you recognize and you'll
| | 02:07 | see to the left of the Formula Bar
in the Name Box, the indicator 4R x 9C,
| | 02:13 | meaning 4 rows by 9 columns.
| | 02:16 | Now the transposed version of
that will be 9 rows by 4 columns.
| | 02:20 | So what we now need to do is go
highlight a range that is the reverse of this.
| | 02:25 | So it's going to be 9 rows by 4 columns and
as you do that you can see the display there.
| | 02:32 | So highlight that area ahead
of time, =transpose, using this data,
[00:02:3963]
Ctrl+Shift+Enter.
| | 02:42 | Obviously, we would want to do some
formatting before we do much else.
| | 02:47 | So we will ignore that for the moment.
| | 02:48 | But every one of these is an array
function and here too, looking a little bit
| | 02:54 | strange because they all look alike.
| | 02:56 | But in this example here, if I change
this to 150 and remember I did that in the
| | 03:01 | prior situation, it didn't
change the lower data. Here it does.
| | 03:04 | Now, probably you would not be
doing this on the same worksheet and
| | 03:08 | you certainly can
and I certainly did it here.
| | 03:11 | But you might want to consider how
this might work for you when you need
| | 03:14 | parallel kinds of views
perhaps on different worksheets.
| | 03:18 | The data here is in sync and
forever linked to the other data.
| | 03:22 | So it's a powerful tool.
| | 03:24 | It's a Transpose function,
which is an array function.
| | Collapse this transcript |
| Building analysis via regression techniques with TREND and GROWTH| 00:00 | On your screen, you are seeing some
monthly sales data in column B.
| | 00:05 | Columns C and D have been labeled, but
there's no data there yet, and the chart to
| | 00:09 | the right currently is displaying
information from column B. Now I have got
| | 00:13 | the chart setup in such way that as
soon as data does go into columns C and D,
| | 00:18 | we are going to see these on the chart as
well in the form of different kinds of lines.
| | 00:23 | You may or may not be
familiar with regression analysis.
| | 00:25 | I had a cursory knowledge of it. I am not
sure if I can explain it the way I need to.
| | 00:30 | But let's imagine the following situation.
| | 00:33 | To provide the underpinnings for what
might be a look ahead at the sales trend here,
| | 00:38 | I am using trend there in a
common sense, where are we headed with growth
| | 00:43 | in this particular environment here?
| | 00:45 | In order to create an analysis of this
line, you can use charting techniques.
| | 00:50 | But there's also a function called a
trend, an array functions that will take
| | 00:55 | advantage of the values found here,
and then in effect create a straight line
| | 01:01 | set of values here that are a
reflection of the data that's in column B.
| | 01:06 | As with the Frequency function and
the Transpose function, we highlight the
| | 01:10 | cells that are going to get the results first.
| | 01:13 | We highlight all of them. What we are
about to create here is a straight line,
| | 01:18 | regression line, based on
the data in column B. =trend(.
| | 01:26 | Now this function has more
possibilities, more capabilities I should say,
| | 01:30 | than what I am using here.
| | 01:31 | Here is a somewhat simple
and straightforward use.
| | 01:34 | We simply want to be analyzing the data here.
| | 01:37 | We are not bringing out the r-squared
factor in it or anything like that, if you
| | 01:41 | are familiar with regression analysis.
| | 01:42 | We are simply going to be creating a
new line in column C or a new set of data.
| | 01:47 | It will be reflected in chart.
| | 01:49 | There is the function. Ctrl+Shift+Enter
and there's that straight line regression.
| | 01:57 | Similarly, the word Growth represents
another function and this will perform an
| | 02:02 | exponential analysis of the data
in column B. Same general approach.
| | 02:07 | Highlight the information here,
=growth(, highlight the column B data again.
| | 02:15 | Ctrl+Shift+Enter.
| | 02:17 | Now anybody who has worked with
regression analysis know there's a lot more
| | 02:23 | to it than the simple example we are
seeing here, and yet this is a quick and
| | 02:27 | efficient way of creating those
additional lines that will lead us into a better
| | 02:31 | explanation of what has happened, and
what is likely to happen, and where this
| | 02:35 | organization is headed in terms of sales.
| | Collapse this transcript |
| Combining multiple functions in arrays| 00:00 | If you're familiar with the VLOOKUP,
MATCH, and INDEX functions, you know how
| | 00:05 | powerful they are, and yet there will be
times when they just don't seem to work
| | 00:09 | properly, unless you have
some new techniques available.
| | 00:13 | As we look at the information in column G,
we see the name of a person here and
| | 00:19 | imagine this data here possibly
is on a different worksheet, it's in a
| | 00:23 | different workbook, and we are trying
to find the information regarding the
| | 00:28 | sales for this person.
| | 00:30 | Now over in columns A, B and C,
we see that information, but it's displayed
| | 00:34 | somewhat differently.
| | 00:35 | Here's the name Teason Anderson right here.
| | 00:37 | We see the sales value of the 59,597.
| | 00:42 | So what we would like to be able to do
here and probably a VLOOKUP is to say
| | 00:46 | take this value, and go find it over here.
| | 00:49 | The problem is that VLOOKUP looks in
the left-hand column of the range that we
| | 00:54 | are selecting, and we could somehow
figure out way to pull out Anderson, but in
| | 00:59 | a short list here we don't have any
repeats, but you can bet in a longer list
| | 01:03 | you're going to have some last
names that are going to be identical.
| | 01:06 | So what we are really looking for
here is that combination of names.
| | 01:11 | As we see these two here. And if we
start to use a VLOOKUP immediately, even if
| | 01:16 | you're familiar various
concatenation techniques, and other ideas,
| | 01:19 | other possibilities in Excel, in effect you're
trying to say let's take this value and locate it.
| | 01:25 | And then we start to think, well I guess
we could put these together, couldn't we?
| | 01:29 | But we need to find information in the
left-hand column that would be here, and
| | 01:34 | then we've got to go into
column 3 to get the data.
| | 01:37 | So if you start to kick this around,
you'll realize this is not going to work
| | 01:41 | the way we see this now.
| | 01:43 | So instead we might start with a MATCH
function, and here too we are going to
| | 01:47 | run into some difficulty.
| | 01:48 | Now the MATCH function sometimes is
used simply to tell us if information is found,
| | 01:54 | and let's start off
with that thought in mind.
| | 01:57 | If Teason Anderson here is found over in
column A, B of that other list, which you
| | 02:01 | remember might be in another worksheet,
| | 02:04 | match(G2, but let's pull together
the information from columns A and B.
| | 02:11 | The last names are found in column A.
So let's take all these at once, and we
| | 02:15 | are going to be using an
array to pull these together.
| | 02:18 | We'd like to take not just A2 and B2,
and then A3 and B3, but all of column A,
| | 02:26 | as well as all the data in column B.
But to make these entries match up, we need
| | 02:31 | to also put in here, by way of a
concatenation symbol, we need to put in double quote
| | 02:37 | comma space double quote.
| | 02:40 | In other words we need to take the last
names as they appear in column A, put in
| | 02:44 | a comma space, one more And there,
and the information from column B.
| | 02:52 | And we must find an exact match.
| | 02:54 | So the third argument in
the match function is 0.
| | 02:59 | Second argument here of course is quite large.
| | 03:01 | We are looking here in column A along
with a comma space and column B.
[00:03:0 7.83]
And youcan't deal with cells like this
without making this an array formula.
| | 03:12 | So we must hit Ctrl+Shift+Enter and
if found, this tells us where within
| | 03:18 | the array it was found.
| | 03:20 | It was found in the 11th position.
| | 03:22 | Well that's actually the 12th row, because
we're looking at data starting right here.
| | 03:26 | So we could've changed this.
| | 03:28 | We could start it at A1. I will do it
anyway to show how that might play out
| | 03:31 | a little bit, and B1.
| | 03:34 | This time Ctrl+Shift+Enter, so at
least it matches up the row number.
| | 03:38 | It's a little easier to verify.
| | 03:40 | So that tells the row number, then we
need to use that row number as the second
| | 03:45 | argument in an INDEX functions.
| | 03:48 | INDEX simply says we're
looking at a table of data.
| | 03:52 | It might be only a single column,
like this data right here, comma.
| | 03:57 | This tells us the row number and
since it's only a single column, we don't
| | 04:01 | need a column number.
| | 04:02 | We do need a right parenthesis.
| | 04:04 | It's still an array formula.
Ctrl+Shift+Enter, and there is that answer
| | 04:10 | that we're looking for.
| | 04:11 | There it is right there, Teason Anderson,
59,597 and before copying this,
| | 04:17 | we'd want to make sure that
we've got absolute addresses.
| | 04:19 | So the formula is going to look even
more complex, as we throw in those dollar
| | 04:23 | signs with the F4 key and we'll need to
do that here also and here, and again
| | 04:29 | it just makes the complexity
of the formula look greater.
| | 04:33 | It doesn't necessarily. Ctrl+Shift+
Enter, copy these down the column.
| | 04:38 | Now we have the answers for all
persons here except there are two situations
| | 04:42 | where we didn't even find the name.
| | 04:44 | Now had we done the MATCH function first
for all of these that would have popped
| | 04:48 | out immediately, but Renee Hood as we
see here, and we find it over here in the list,
| | 04:53 | but look at the way
her first name is spelled.
| | 04:55 | That's an obvious difference and with
Yvonne Randell right here, that's Yvonne,
| | 05:01 | this is Yvone and of course that's
going to happen from time to time.
| | 05:06 | But as we look at this formula again,
the combination of INDEX and MATCH,
| | 05:11 | it's an array formula.
| | 05:12 | Now remember you are not seeing those
braces until you hit Ctrl+Shift+Enter,
| | 05:16 | but incredible power here.
| | 05:17 | There is just no other easy way to do this.
| | 05:20 | Although this might not seem easy the
first two times around, remember you do a
| | 05:24 | lot of work to come up with the answer
once and then when you copy down the column,
| | 05:28 | you've taken care of
thousands of cells potentially.
| | 05:30 | There is no question this is one of
Excel's greatest power tools, an array
| | 05:35 | formula and often used
with other functions together.
| | Collapse this transcript |
|
|
10. Text FunctionsLocating and extracting data with FIND and MID| 00:00 | One category of Excel functions that
doesn't always get its due and yet it
| | 00:05 | consists of a variety of really powerful
functions is a category called text functions.
| | 00:11 | On the Formulas tab in the Ribbon,
you will see a list of them here and two of
| | 00:17 | the more prominent ones, although when
you first see some of these you are not
| | 00:20 | quite sure how you might use it,
involve the word were FIND, which almost
| | 00:25 | defines itself and the word Mid.
| | 00:27 | Let's take a look at how
we might use some of these.
| | 00:30 | Small situations, we have a small example.
| | 00:33 | The Part numbers being used in this
organization are based on the timeline or
| | 00:37 | concept that the character
position of these Part numbers has some meaning.
| | 00:42 | And in a variety of different ways
you will here and there hear about a
| | 00:45 | descriptive number where maybe the
third character, the third and fourth
| | 00:49 | characters together represent either the
size of the item, the cost of it, where
| | 00:53 | it might have been made, the year,
the color, all those kinds of things.
| | 00:58 | And for whatever reason it's important
in this particular example maybe to see
| | 01:02 | if the letter G is in here.
| | 01:04 | Now maybe it's context,
particular position, maybe not.
| | 01:07 | We just want to know if that letter exists.
| | 01:10 | Now we are really talking about
another feature that here and there might be
| | 01:14 | what you need and that would be the
feature off of the Home tab, the extreme
| | 01:19 | right group called Editing, Find & Select.
| | 01:22 | So, sometimes you might just want to
find and see if the letter G is in here
| | 01:27 | and you don't want to match the entire cell
contents if you are trying to look inside of it.
| | 01:31 | Maybe we are just looking here and
we could find them one by one or maybe
| | 01:35 | just go to Find All.
| | 01:37 | And we will get a little list here and
you will see that it was found and cell A3.
| | 01:41 | You can see that clearly.
| | 01:42 | Actually there are two Gs
in there and also on cell A5.
| | 01:46 | It's the second character there.
| | 01:48 | So, that certainly has its role to play.
| | 01:50 | But sometimes we need that information
right here, because maybe based on that
| | 01:55 | we might want other information in a worksheet.
| | 01:58 | So, one approach to this is to use the
function called FIND. What are we looking for?
| | 02:04 | Put this in double quotes.
Double quote. We are looking for a G.
| | 02:08 | Now, I should be capitalizing it, right?
| | 02:10 | Because we are looking for a capital G
and we will get back to that issue in a bit,
| | 02:13 | because that's of concern too.
| | 02:14 | We are looking for the
letter G. Where are we looking?
| | 02:19 | We are looking in cell A2.
| | 02:22 | Now there might be times when you need
to start not at the leftmost position
| | 02:27 | of the cell and if you do, you need
to put in a third argument here that
| | 02:31 | indicates the starting character.
| | 02:33 | Now, that's a much more rarely used
feature and so very often you won't need any
| | 02:38 | more than what we are seeing right here.
| | 02:41 | We want to find the letter G in cell A2
and the result here if found will give
| | 02:47 | us the character position.
| | 02:48 | And of course you can see here, it will not
be found, so we will get this as a result.
| | 02:53 | Simply by dragging this down we will
see and of course we can see it clearly on
| | 02:57 | the screen where this is working and
in situation number two there, that's
| | 03:01 | actually row 3, G was
found in the second position.
| | 03:05 | Now, notice it didn't find the third
one or it didn't mention that there is a
| | 03:08 | second one in there.
| | 03:09 | That's the first place it found it and in
both cases here, it finds it in position two.
| | 03:14 | Now, I had mentioned here the idea that I
used uppercase. How about lowercase here?
| | 03:19 | Is this going to work here?
| | 03:21 | No, there is no lowercase G.
| | 03:24 | Now, there might be times when you are
going to find a G, if it's uppercase or
| | 03:29 | lowercase, in that situation what you
would want to use is the functions that's
| | 03:33 | very similar and same general syntax
and everything, but it's called SEARCH.
| | 03:37 | There we go and the SEARCH function
and let's focus on this one particularly.
| | 03:42 | SEARCH says I am looking for G. Now
even though I had used lowercase here,
| | 03:46 | it finds the capital G. And so you have
to think out different variations on when
| | 03:51 | you are specifically looking
for the upper and lowercase.
| | 03:54 | You want to use the FIND function,
but if you don't care use SEARCH.
| | 03:58 | Now, another function that allows us to
work with that data and sometimes either
| | 04:03 | by itself or in combination with a
Find or Search is a function called MID.
| | 04:09 | Now, think of the word middle here
and let's not take that word literally.
| | 04:13 | But the MID function allows us to
pull out information from the middle of a
| | 04:18 | character and again, not
necessarily the exact middle.
| | 04:21 | Here is one example and possibly you
might approach this differently too by
| | 04:25 | taking the information in the column C
and splitting it into different columns.
| | 04:29 | But we might want to extract from
here the state. In all cases, the state
| | 04:34 | entered here is two characters, but where is it?
| | 04:37 | If we were to approach this, while we
are just looking at the MID function or
| | 04:41 | thinking of it only by itself, we would
say well, what are we starting at here?
| | 04:45 | What are we trying to find out of here?
| | 04:47 | And so we're looking at this text right
here, but we don't know where to start.
| | 04:52 | And the first case here of Boulder
Colorado, Boulder, that's seven characters,
| | 04:59 | the comma is eighth and the space is ninth.
| | 05:01 | We need to start at the tenth position.
| | 05:04 | Obviously, in the next entry it's not
going to be ten or the entry after that.
| | 05:08 | So, sometimes you will use these
together, and not always. I don't mean to
| | 05:12 | suggest of the MID function is used
always with FIND because it isn't, but there
| | 05:17 | can be situations where you need to
pull out data from a given starting point.
| | 05:21 | So, in this case we might start with
=find, just like we did in the previous
| | 05:26 | example and what indicates
the end of the city? The comma.
| | 05:31 | So, we are looking for within double
quotes the comma, and we are looking in
| | 05:37 | the cell right here.
| | 05:39 | So, this of course is going to
tell us where the comma is found.
| | 05:42 | It's in the eighth position.
| | 05:43 | So, armed with that knowledge, we can
then use the MID function and say we're
| | 05:49 | looking here, comma. And where do we
want to start extracting data from?
| | 05:54 | This tells us where the comma is.
| | 05:57 | We want to start two characters
later, not one character later.
| | 06:00 | That's the space, but two characters later,
so we are going to add 2 to this, comma.
| | 06:06 | Now how many characters do we want to extract?
| | 06:09 | Just two to pick up the state.
Multiple parenthesis, we need to put it in the
| | 06:14 | closing parenthesis, so
this will extract the state.
| | 06:18 | Now, if you have any choice in
redesigning the way this data is displayed,
| | 06:22 | ideally the data in column C really
should be split into three columns.
| | 06:26 | That's a different issue.
| | 06:27 | But we are able to pull out information.
In this case using the MID function
| | 06:32 | along with the FIND function.
| | 06:35 | Now based on different needs at
different times and looking back at the data in
| | 06:39 | column A, you will at different
times to have a different need for this.
| | 06:43 | You will want to pull data out of
column A. Maybe it so happens that the
| | 06:48 | fourth and fifth positions in column A reflect
the color code of the items in questio.n =mid.
| | 06:55 | We are looking at the Part# here.
| | 06:57 | We are looking here and we want
to start at the fourth position.
| | 07:02 | In that first example that would be
the letter K. So we want to start at the
| | 07:05 | fourth position and extract
two characters from there.
| | 07:10 | So, we want to pull out of that first
set of data there with the first cell in A2.
| | 07:14 | We want to pull out K9
and that's what we will see.
| | 07:19 | And you will see what's
happening in the others of course.
| | 07:20 | Same general idea. We are pulling out
information, not necessarily from the pure
| | 07:25 | middle, but the word Mid
helps us remember what it means.
| | 07:29 | One by one functions like this are not
always that compelling and yet sometimes
| | 07:34 | used in combination or in dealing
with data that we didn't design,
| | 07:39 | they can be extremely viable when
trying to extract data from cells that we
| | 07:43 | didn't necessarily design, yet we have them on our
screens and we need to get to the information quickly.
| | Collapse this transcript |
| Extracting specific data with LEFT and RIGHT| 00:01 | A common problem in some kinds of
data in Excel is that there is perhaps too
| | 00:05 | much information in a given column.
| | 00:07 | Now, we don't need to go into all the
details to tell you why maybe column A
| | 00:10 | would've been better if we split out
the names or column F would have been
| | 00:14 | better if we split that
into three separate columns.
| | 00:17 | Let's imagine a situation like we see
in column C. There is nothing wrong with
| | 00:20 | that display, but we might just need to
get information either from the left or
| | 00:25 | the right side of the entries there.
| | 00:27 | And like a lot of part number codes
maybe these are position sensitive and
| | 00:31 | perhaps in this example here, the first
two characters from the left represent a
| | 00:36 | color code or size code.
| | 00:38 | Let's extract two characters from the
left-hand side of the data in C2 for
| | 00:42 | starters, using the function
=left. Where are we looking?
| | 00:48 | Right there in C2, comma. How many
characters do we want to extract from there? Two.
| | 00:53 | And we see what happens of
course on the other cells.
| | 00:55 | We just pull out the two leftmost characters.
| | 00:59 | Similarly, as you might imagine in a
different scenario, a different situation,
| | 01:03 | maybe there are the three rightmost
characters have some meaning and so without
| | 01:06 | skipping a beat here, we could
simply use for that example here
| | 01:10 | RIGHT, meaning right of course and from the
right-hand side, how about three characters?
| | 01:15 | Just to show the contrast here,
pretty simple, pretty straightforward.
| | 01:20 | And also take a look at column F.
Again without going into the details of why
| | 01:24 | that could have been better, let's
simply pullout the five rightmost characters,
| | 01:28 | because we'd like to sort our data by zip code.
| | 01:31 | We need to isolate the zip code.
=right, simply looking at this data, comma, 5
| | 01:39 | and we'll do that for the other cells as well.
| | 01:42 | Pretty straightforward!
| | 01:43 | Now, the data in column A is in an
appropriate order but we might want to
| | 01:47 | isolate the last name only,
and possibly the first name too.
| | 01:51 | That might take a little bit more work here
but let's just pullout the last name only.
| | 01:55 | The problem here might be that we
don't always need the same number of
| | 01:58 | characters, so we can't use the same
function exactly unless we happen to know that,
| | 02:03 | and we do know, let's say a
comma tells us the end of the name.
| | 02:08 | So if we were to find the comma first,
this is again a suggestion along the
| | 02:12 | lines of one-by-one some of the text
functions might not be that strong and yet
| | 02:17 | when used with others really
can give us some power here.
| | 02:21 | So let's find the comma first, =find,
find the comma in A2, and in this case,
| | 02:30 | it's in the 6th position so when we
know that, then we can then say we want to
| | 02:35 | pull out data from the left-side of A2
and if we use the value that we've got
| | 02:43 | from comma, we're going to be
extracting in this first case Baker comma.
| | 02:48 | So wherever we found the comma,
we want to takeaway 1 from that.
| | 02:51 | In effect in this case, we want to
extract the five leftmost characters, and
| | 02:57 | that's exactly what happens here,
and it would do the same thing here.
| | 03:00 | So once again, you can get a little
creative using these in combination, but for
| | 03:03 | the most part the Left and Right
functions are fairly straightforward.
| | 03:07 | You are extracting data from the
left or the right side of a given cell.
| | Collapse this transcript |
| Removing excess spaces with TRIM| 00:01 | Looking at the data in column A
reveals some obvious problems.
| | 00:05 | We're seeing too many spaces here and there.
Some leading spaces in row 8, and in row 15.
| | 00:12 | Too many spaces between names in row 3
and row 4 and perhaps a few others and
| | 00:17 | we want to clean these up fast.
| | 00:19 | Now in a large list, leading spaces,
particular if there is only one, don't
| | 00:24 | always jump out at you.
| | 00:26 | You might have a much smaller zoom factor.
| | 00:28 | You might have thousands of records and then
one day you happen to sort the information.
| | 00:32 | I'm going to do a quick
sort on this column here.
| | 00:35 | Notice the last names are first.
| | 00:37 | This will be a sensible thing to want
to do, and you got a good deal of data.
| | 00:41 | The fast way to do it on the Data tab
is a simple A to Z Sort, and sure enough,
| | 00:46 | this would get our attention
immediately, and there it is.
| | 00:49 | We've got leading spaces.
| | 00:50 | Two of them there, one there and
we've got some multiple spaces.
| | 00:54 | How do we deal with this?
| | 00:56 | Pretty easy, pretty direct with the
function called TRIM. And by the way,
| | 01:01 | there might be some trailing spaces
and how do we locate those manually?
| | 01:06 | You can double-click in the cell.
| | 01:07 | You can also do this in the Formula Bar.
| | 01:09 | There is none there, none there.
| | 01:12 | This is going to get old, isn't it?
| | 01:13 | We're going to find any of this way?
| | 01:15 | Well, I happened to know that there
is one here right there. I'm going to
| | 01:18 | double-click in row 13,
there is a trailing space there.
| | 01:22 | You would also see that in the Formula
Bar, if you click up there, off to the
| | 01:25 | right somewhere as opposed to maybe some
other cell, right here, click out there
| | 01:30 | to the right, you see what's happening.
| | 01:31 | You can certainly find them manually, but
you know that's not what you want to do here.
| | 01:36 | The function called TRIM will
effectively do three things for us.
| | 01:39 | It's going to give us this data
without any leading spaces, without any
| | 01:44 | trailing spaces and multiple consecutive inner
spaces, like we see here, will be reduced to 1.
| | 01:51 | So it's simply =trim.
| | 01:55 | You don't know or you don't see that
anything might have been done to the
| | 01:59 | trailing spaces, but the results here
do not contain trailing spaces and so
| | 02:04 | we'll see for the entire column.
| | 02:06 | Again, the obvious, leading and
multiple inner spaces are dealt with, and
| | 02:11 | we don't even know yet that it's corrected
here, because these are still formulas.
| | 02:16 | Now a lot of you know that you can
quickly turn these into results, simply with
| | 02:22 | the right mouse button, dragging them
temporarily elsewhere then right back on
| | 02:26 | top of themselves to convert them
to values real fast, just like that.
| | 02:30 | And the example there, no trailing space.
| | 02:34 | Now, not only do you want to do this
for sorting reasons, but you also need to
| | 02:39 | do this if you've got any kind of
logic involved with trying to locate items.
| | 02:43 | It's perhaps not too common to try and
use other functions to find names, as it
| | 02:49 | might be items, say sales
items or codes or something.
| | 02:53 | But just a simple example
here will point out an issue.
| | 02:57 | Imagine on a different worksheet
you've got some names. Here is a name here.
| | 03:01 | You want to see if this name is
found in column A in this worksheet.
| | 03:06 | You might use an If function.
| | 03:07 | You might try a VLOOKUP and more direct
to probably give you the MATCH function.
| | 03:11 | How about a simple MATCH here? =match.
| | 03:13 | We'll try and find Ryan
Long in column A that is.
| | 03:18 | We're looking for Ryan and here is
the data we're looking at and the MATCH
| | 03:23 | function requires us to put into
zero to find that exact match and are we
| | 03:27 | going to find Ryan Long? No, we are not.
| | 03:30 | And if you knew that leading spaces were
in effect here, what you might do is to
| | 03:35 | say okay, I'd like to look somehow for
the trimmed version of this, but that
| | 03:40 | would get involved in using array formulas.
| | 03:43 | So you better clean up your
data, but could we do this here?
| | 03:45 | Yeah we could do a TRIM, couldn't we?
| | 03:47 | We can do that there, but we are going
to have to hit Ctrl+Shift+Enter and do it
| | 03:51 | with an array formula.
| | 03:52 | Then it will find it in the 12th
position, but it's much, much better to clean
| | 03:56 | up the original data and that would
be the way we did this in column B.
| | 04:01 | So backtracking a little bit here,
and changing all of this to simply be
| | 04:05 | looking at column B, if we have our data
cleaned up, we wouldn't need to worry about this.
| | 04:11 | And it will find Ryan Long
now in the 12th row of that range.
| | 04:15 | Here it is, right there.
| | 04:17 | This is Ryan Long without a trailing space.
| | 04:19 | So there is no question that here
and there you will need to use the TRIM
| | 04:23 | function to cleanup data. It's fast.
| | 04:26 | It's easy and you never want to be
retyping data very much and particularly not
| | 04:29 | in a case like this where
you've got thousands of entries.
| | Collapse this transcript |
| Using CONCATENATE with functions| 00:01 | Although the information in columns A,
B and C happens to be correct, it might
| | 00:05 | be more efficient from your
perspective to gather that information and
| | 00:09 | essentially to put it in one cell in
column D. And a typical approach to this
| | 00:15 | would be, as we look at the information,
for example, in row 2 we would like to
| | 00:19 | see in cell D2 Baker, Mark S. So we
need to pull together information, from
| | 00:29 | different locations.
| | 00:30 | Two broad approaches to this.
| | 00:32 | One is a function called Concatenate
and another is using what's called the
| | 00:38 | Concatenation symbol, the ampersand
above the number 7 key on most keyboards.
| | 00:42 | Let's talk about Concatenate first.
| | 00:45 | This is pulling together information from
different sources and we see it in the list here.
| | 00:50 | You can just click here, Tab,
Concatenate and it simply suggest text1, text2,
| | 00:56 | a whole series of entries, some of which
will come from existing cells, some of
| | 01:01 | which will come from text string that
we put in with sets of double quotes.
| | 01:05 | So we need to get the information for
the Last name that's right here. Comma.
| | 01:09 | The next thing we need to follow Baker
is the text string of comma and space.
| | 01:15 | This needs to be embedded within double
quotes and then a comma to indicate we
| | 01:19 | put in that information.
| | 01:21 | Now we need to get information from
cell A2 and typically following the first name Mark,
| | 01:28 | we would want to see a
space so we put in Mark in this case.
| | 01:32 | Now we need to put in the text string
simply a space and after this another
| | 01:38 | comma and we need to put in the middle
initial and we want put in after that
| | 01:44 | a period, double quote period,
double quote and we see that entry.
| | 01:49 | And let's test it out on a few cells and
we've got a little problem it looks like.
| | 01:56 | Hansen, Sheila. The trailing space.
| | 01:59 | So we don't really want that period all
the time. What are we going to be doing here?
| | 02:03 | If cell C3 is blank, how are we
going to change the logic here?
| | 02:09 | One approach is to insert an if, to do
it right here to say if that cell is
| | 02:16 | blank or to phrase in other way, if it's
not blank we do want to put the period.
| | 02:20 | If it is blank, we don't
want to put the period in.
| | 02:22 | So what essentially do we do here?
| | 02:24 | How about an if function right
here right in the middle of this?
| | 02:28 | Check to see if this particular cell right here.
| | 02:32 | If it is blank we want to see nothing.
| | 02:35 | If it's not we want to see the period.
| | 02:37 | A function you may or may not be aware of
this function called isblank. Is cell C2 blank?
| | 02:46 | Is the logical test here, comma.
| | 02:48 | If it is, what do we want to see here?
| | 02:50 | Nothing additional.
| | 02:51 | That null string is a sometimes called,
double quote double quote. Nothing at all.
| | 02:57 | In all other situations, when it's
not blank we want to see the period.
| | 03:03 | And so this is an if function,
inside of concatenate, right parenthesis.
| | 03:08 | First situation we don't know
yet if it's going to be working.
| | 03:11 | Check it out on a few cells.
| | 03:13 | It appears to be working and from here, we
could just drag it downward, there we go.
| | 03:18 | And so that's one way to pull together
information from different locations,
| | 03:22 | the Concatenate function. And you don't
always need this of course with the IF function.
| | 03:27 | Now that may or may not be your
preference, but the other choice here would be
| | 03:31 | not to use concatenate but
simply to use the symbols.
| | 03:35 | And in this situation here, you might
just work off of this and by editing,
| | 03:39 | instead of this and you can see the
plus will be that we don't need this
| | 03:44 | long function name here.
| | 03:46 | But we do need to put in the ampersand
repeatedly and so we would like to see B2
| | 03:51 | and the comma space, and
you see what's happening here.
| | 03:56 | For the most part replacing those
comma separators with the ampersands.
| | 04:01 | So we got to put these in
over and over and over again.
| | 04:05 | And the rest of this should
work properly. There we go.
| | 04:11 | Now I might compare this with the
second one here, back and forth a little bit,
| | 04:15 | or possibly just hit Ctrl using the
Tilde symbol, which is usually on my keybard
| | 04:19 | over the Tab key, the Shift key,
to compare the two of them there.
| | 04:23 | You see the top two in terms of length.
| | 04:25 | That's not always the way to measure how
difficult a function is but you kind of
| | 04:29 | see the two together and can make a comparison.
| | 04:31 | I tend to use the first
example more than second.
| | 04:34 | But again, you can have your choices.
| | 04:36 | Both of them get to the heart of the
matter and that's pulling together data
| | 04:40 | from different sources.
| | 04:41 | Let me hit Ctrl+Tilde again to
get back to a normal display.
| | 04:45 | Whether you're using Concatenate or
the Concatenation symbol, you can see how
| | 04:49 | effective this is in pulling together
information, not only from different
| | 04:53 | locations, but by actually using text
strings that are needed in these examples.
| | Collapse this transcript |
| Adjusting case within cells with PROPER, UPPER, and LOWER| 00:00 | There's nothing really wrong with the
data in column A, nor the data in columns
| | 00:06 | D and E. But let's face it.
| | 00:07 | Many times we don't want to
see data that's all uppercase.
| | 00:12 | And in B2, we see the way we might
want to see Donna O'Brien's name.
| | 00:18 | Just the O and the B
capitalized in O'Brien and the D in Donna.
| | 00:21 | And we certainly don't want to re-type this.
| | 00:23 | It's is a great function for this,
simple and easy to use, =proper.
| | 00:28 | Proper will capitalize the first letter
of the entry as well as any letter that
| | 00:34 | follows a space or any punctuation.
| | 00:37 | So the B that follows the O actually follows
an apostrophe. It's going to be capitalized.
| | 00:42 | And we're simply looking at the data
here and D will be capitalized and fast and
| | 00:47 | easy, what else do you need?
| | 00:49 | Copy this down in the column
| | 00:51 | Occasionally, I get a question when
I'm teaching this in live session.
| | 00:54 | Anything we can do here with McDonald?
| | 00:56 | Is there way to make that D capitalized?
| | 00:59 | Certainly no easy direct way, and you
might imagine somewhere down the road
| | 01:02 | in the future that maybe
there will be a way to do this.
| | 01:05 | It does work here with the apostrophe.
| | 01:06 | But you see what's happening in all other cases.
| | 01:09 | Keep in mind this works for other
kinds of situations. If these are book titles,
| | 01:13 | it might be what you want too.
| | 01:15 | But it will be capitalizing all those
Thes and the As and the Ans and so on.
| | 01:20 | You don't have to adjust those manually.
| | 01:22 | This not a question.
| | 01:23 | This is a fast and easy choice here.
| | 01:25 | And in column F, you might want to do,
not only an adjustment here, but also
| | 01:30 | pulling these together.
| | 01:31 | And it's just a reminder that sometimes
knowing different capabilities with
| | 01:34 | text strings allows us to do this.
| | 01:36 | So a quick adjustment here might be
let's use proper here, along with the
| | 01:41 | ability to pull together, for example,
Baker just coming out of E2 and then
| | 01:47 | after that double quote comma space
and Mark and that's all we need there.
| | 01:54 | So we're pulling together the names
from different locations as well as using
| | 01:58 | the Proper function here, to make only
these significant letters be capitalized.
| | 02:03 | There are other times when you got
letters in lowercase, the way we see them in
| | 02:06 | the column H, and we want to make
the letters here in uppercase.
| | 02:11 | So the function of course is called Upper.
| | 02:14 | It does nothing with the numbers that
are in there. Nothing it can do with those.
| | 02:17 | It simply checks the text
entries and makes them uppercase.
| | 02:20 | So here we've got upper.
| | 02:22 | All the text entries here become uppercase.
| | 02:25 | If for whatever reason, you have data
like this and you did want those letters
| | 02:29 | to be in lowercase, you would use this function.
| | 02:32 | And I just can't think of a very good
example when I would ever use the Lower
| | 02:35 | and I can't think when I have ever
used it except just to prove an example.
| | 02:38 | So that's Lower looking at the data in column A.
| | 02:42 | So fast and easy and a quick adjustment.
In all these situations where you're
| | 02:46 | using these functions to adjust,
the follow-up step most of the time is to say,
| | 02:52 | okay I would like to keep this
data and throw away the original.
| | 02:57 | And a very fast way to do this is
simply to take the results by way of these
| | 03:02 | functions and with the right mouse
button, drag them on top of the old data as
| | 03:06 | we might do here, drag it on top of the
old data with the right mouse button and
| | 03:12 | from the pop-up menu Copy Here as
Values Only then, we could just get rid of
| | 03:16 | this and we're all set.
| | 03:18 | And sometimes, you'll do that to itself,
like in this case, here put a new title
| | 03:23 | up there, perhaps take this data and
simply with the right mouse button copy it
| | 03:28 | up or down, left or right, to bring it
right back on top of itself, let go.
| | 03:32 | Copy Here as Values Only.
| | 03:35 | The formulas are all gone, the
results are left, get rid of this.
| | 03:38 | You don't need that anymore.
| | 03:39 | So fast, easy techniques for
adjusting upper and lowercase using the three
| | 03:44 | functions Proper, Upper and Lower.
| | Collapse this transcript |
| Adjusting character content with REPLACE and SUBSTITUTE| 00:00 | The two text functions Replace and
Substitute have something in common.
| | 00:05 | And the Replace function actually
has something in common with one of the
| | 00:08 | command sequences in Excel.
| | 00:10 | Let's see how these two different text
functions are related to one another.
| | 00:14 | In column A and B, we see some
entries and in this first cluster of
| | 00:19 | information right here, I've titled in
B1 what we actually want to see below
| | 00:24 | and this is manually done here.
| | 00:26 | There are times when you want to
replace a given character with either other
| | 00:32 | characters or perhaps nothing, and you
see the effect of what's happening here.
| | 00:37 | Now if we wanted to replace all the
hyphens in a list like this, we could
| | 00:42 | just easily jump in on the Home tab in the extreme
right in the Editing group, Find and Select.
| | 00:48 | They can do replace here and simply
say every time we've got a hyphen here,
| | 00:53 | we replace it with.
| | 00:54 | We don't even have to jump into the next
panel below where it says Replace with.
| | 00:57 | We will just do a Replace All, and
all hyphens, and remember there are two
| | 01:01 | in each of that set of data that are
in column A, they are all replaced and
| | 01:05 | it tells us how many.
| | 01:06 | Simple straightforward.
| | 01:07 | You don't need a function for that.
| | 01:08 | So I am going to click OK and close and
then Undo, Quick Access Toolbar there.
| | 01:14 | But sometimes we might to want to
replace this either with a specific character
| | 01:18 | or with something else.
| | 01:19 | Let's talk about how to use the Replace
function here, =replace, and this is position based.
| | 01:26 | We are not looking for a text here.
| | 01:27 | We are going to do this by position.
| | 01:29 | What might throw you at first
is it says old text.
| | 01:32 | You certainly can use double quotes here,
but we want to be working off of the
| | 01:35 | data in cell A2 here, and we are looking
for what's in the fifth position and
| | 01:41 | in all cases here the
fifth position has a hyphen.
| | 01:45 | So we put in the 5.
| | 01:47 | And we only want to replace one character.
| | 01:50 | It says number of characters.
| | 01:52 | We want to replace one character and what
do we want to replace it with? Nothing.
| | 01:57 | So I will just put on a comma, all
done here and we see what has happened.
| | 02:01 | Of course, we can copy that down and
see the effect of the way it's done
| | 02:05 | manually, but this is how it's done here.
| | 02:07 | We are replacing the fifth
character and only the fifth character with
| | 02:12 | effectively nothing.
| | 02:13 | Now, a slight alteration here.
| | 02:15 | If we wanted to replace the
hyphen with some other character, all right,
| | 02:18 | or it can be a letter certainly, if
you wanted to. Whatever it takes here.
| | 02:21 | First of all, double quotes are required,
but you want to replace this with the
| | 02:24 | letter X. That's big and prominent,
just to show what it would do here.
| | 02:28 | Something like that and
you see the effect there.
| | 02:32 | Similarly, if these were multiple
characters, you might put in XXX, just to show
| | 02:37 | how that might work.
| | 02:39 | So here we are replacing one character
with three characters and it looks like that.
| | 02:44 | So lots of variations and as soon as
you will see a few examples of these,
| | 02:47 | you will just keep that in the back of
your mind. Here and there when you have
| | 02:50 | to massage data, when the command
isn't appropriate because you don't want to
| | 02:53 | get rid of all characters, this is based on
a character position. That's where we remove.
| | 02:59 | Example over here, just for
variety, same general idea.
| | 03:02 | Here's the eighth character, and if
you look at the original data, the eighth
| | 03:06 | character is a hyphen over there, a dash,
and replace that with the (USA) and so
| | 03:12 | just a quick look of this
=replace and same general idea.
| | 03:16 | This is the data we are looking at.
| | 03:18 | In this case, we are starting in the
eighth character and we want to replace
| | 03:21 | one character over there again, but
this time what we are replacing with is
| | 03:25 | within "(USA)" and done.
| | 03:32 | So you see how that could be done too.
| | 03:34 | Quite a variety of options with this.
| | 03:37 | Now the other function called
Substitute, in contrast with the Replace function,
| | 03:43 | the Substitute function is
about content not about positioning.
| | 03:47 | The description at first looks similar to
the one related to Replace up in row 1,
| | 03:52 | but in row 7, this says
Substitute - remove the first dash.
| | 03:56 | Now we can remove the second dash,
as you see over in column E there.
| | 03:59 | This works a little bit differently.
| | 04:01 | Same general idea though.
| | 04:03 | We are trying to change the content of
the body of cells, group of cells perhaps.
| | 04:07 | Type =substitute this time and
here's what we are looking at, comma, what we
| | 04:14 | are trying to substitute for it, as the
case may be a hyphen, and what we want
| | 04:19 | to put in place of that is essentially
nothing, so we can just leave that argument blank.
| | 04:24 | But we only want to replace the first
instance of it, and there we go and
| | 04:27 | you see what's happened.
| | 04:29 | The second one remains there.
| | 04:30 | So we only removed the first one.
| | 04:32 | Again, so you don't necessarily get
the idea of that the Substitute means
| | 04:36 | remove, because it doesn't.
| | 04:37 | Instead of that hyphen, we might
want to put in, and again I'll use just
| | 04:41 | a different symbol.
| | 04:42 | Maybe it's the pound sign, "#", just
something else to put in there instead of the
| | 04:48 | hyphen and you see what happens there.
| | 04:51 | If we wanted to do that for all
occurrences of this, if we just leave off the
| | 04:56 | last argument here, this will replace
all occurrences of hyphen with a pound and
| | 05:01 | there too we might be thinking about
using this by way of the command rather
| | 05:05 | than actually using a function here.
| | 05:07 | But we wanted to do just a second
occurrence, so we will put in a ,2
| | 05:10 | and this will change the second
dash there to a pound sign.
| | 05:14 | So you could see
variations on how that might work.
| | 05:17 | In the example on the right,
similar idea, here we are replacing that
| | 05:21 | second hyphen with XXX.
| | 05:24 | Once again, a quick look at this Substitute.
| | 05:28 | Here's the data we are looking at, once
again we are using that hyphen or dash
| | 05:32 | here and we want to replace that with,
in this case, XXX and we only want to do
| | 05:38 | it for the second example.
| | 05:39 | And you see what's happening there, and
that's what's done in the other cases as well.
| | 05:44 | So here and there using Replace and
Substitute might be quite valuable when
| | 05:48 | you're dealing with tons of data.
| | Collapse this transcript |
| Reviewing additional text functions| 00:01 | If you download data from other sources,
from other software, sometimes you run
| | 00:05 | into situations where the data is
inappropriately displayed and you really can't
| | 00:10 | work with it effectively.
| | 00:13 | Look at the data in column A,
where you'll see trailing minuses.
| | 00:17 | Some software indicates negatives in that style.
| | 00:21 | When it comes into Excel,
typically it's turned into a text entry.
| | 00:25 | And if we try to perform any kind of
mathematical operation on a cell like that,
| | 00:29 | for example, if I attempt to use that
value in A2, at least it looks like a value,
| | 00:34 | and double it, we get something
like this and that's not very helpful.
| | 00:39 | In fact, it's not helpful at all.
| | 00:40 | What we need to do is effectively get
rid of the trailing minus but actually
| | 00:44 | make it keep its negative meaning.
| | 00:46 | We'd like it to look the way it does
right here in B2, but we actually want to
| | 00:50 | show how you can do this by
using various text functions.
| | 00:55 | If you're familiar with how to isolate
characters within the cells, you'll know
| | 00:59 | that it's the rightmost
character here that we need to pull out.
| | 01:03 | The other text function that's going
to come into play here is one that simply
| | 01:07 | tells us the length of an entry.
| | 01:09 | Now in an isolated example, this
doesn't always mean a whole lot, but here is a
| | 01:13 | simple example here, =len.
| | 01:16 | Think of it as being short for length.
| | 01:19 | What's the length of cell A2?
| | 01:22 | How many characters are found over there?
| | 01:25 | And you look at it. It's 7.
| | 01:27 | We have got the three characters, decimal
point, two characters and the trailing minus.
| | 01:31 | There are seven characters there.
| | 01:33 | Now again, by itself that doesn't
mean a whole lot but when it comes to
| | 01:36 | picking apart this information and doing
something with it, that's going to come into play.
| | 01:42 | Now, as I write the function here,
I want to be sure that we can see it
| | 01:45 | clearly as well as A2.
| | 01:46 | So I want to make the column wider
temporarily so we can see this clearly.
| | 01:51 | So the first thing we need to do
here is to find out if the rightmost
| | 01:55 | character is a minus.
| | 01:58 | And in other cases, for
example, in A3 and A5, it isn't.
| | 02:01 | But we want to cover both bases.
| | 02:03 | So we are looking, first of all,
to see if the rightmost character--
| | 02:08 | So we use the text function right.
| | 02:10 | We are looking here, comma.
| | 02:12 | We are looking at the one character on
the right, is that equal to and we've got
| | 02:17 | to put it in double quotes, a minus, comma.
| | 02:21 | Well, if it is, what is it that we want to do?
| | 02:23 | We want to pick everything up out of
that cell A2 to the left of the hyphen.
| | 02:29 | So we need to use the Left
function and the numbers may vary.
| | 02:32 | They could be in a hundreds of thousands,
the tens of thousands, so the number
| | 02:36 | of characters we pick up from the
Left here needs to be one less than the
| | 02:40 | length of the entry in A2.
| | 02:43 | So the number of characters we need,
that's the next part of the argument here for Left,
| | 02:47 | will be the length of A2 minus 1.
| | 02:54 | Now this portion of the formula right
here, if we could look at it for the
| | 02:58 | moment, contains 345.45.
| | 03:03 | What we need to do with that is to
multiply it by -1, because we truly want to
| | 03:08 | take those numerical entries there, the pure
numbers and make sure they come up as a negative.
| | 03:13 | So we can put an asterisk minus 1 comma.
| | 03:17 | So if we do find the rightmost
character being a minus, this is what we want
| | 03:22 | to do with the data.
| | 03:24 | If we do not find a minus on the right
-hand side, we simply want to use the
| | 03:28 | data as it is and Enter.
| | 03:33 | Now don't necessarily count
on seeing the hyphen here.
| | 03:37 | That has to do with formatting.
| | 03:38 | And so that cell might
have been formatted earlier.
| | 03:43 | If you go to Format Cells, you'll know
there are lots of options for Number.
| | 03:46 | Currently, this is the one in place.
| | 03:48 | Now you don't necessarily
have to show the leading hyphen.
| | 03:51 | You might prefer this style or this style.
| | 03:53 | So that's a different issue
and let's not confuse them.
| | 03:56 | This may be for some people more
common style. In an accounting environment
| | 04:00 | they like this look.
| | 04:02 | So we might do that.
| | 04:04 | And we certainly will be able to
copy these down into the other cells.
| | 04:07 | But the formatting issue is a different
one, but you see what's happening here.
| | 04:10 | In all cases here, we have cleaned up
the data and we can use math with these.
| | 04:14 | We can format them.
| | 04:16 | We now have values at our disposal.
| | 04:18 | That's a simple little example I used
before where I took this and double it.
| | 04:21 | Now if we do that, that works just fine.
| | 04:24 | So that's a creative use of using
three different functions there:
| | 04:27 | Right and Left and Len together.
| | 04:30 | And those are the things that make
these text functions really valuable.
| | 04:33 | You don't always sense their value when
you're seeing them in an isolated case.
| | 04:38 | Now another situation I hear about
from time-to-time is what's occurring in
| | 04:41 | column E. Perhaps these are code numbers
and you're not about to use them in any
| | 04:46 | computational sense, but you
want them to look like this.
| | 04:49 | And I think you know what
happens if you type leading zeros.
| | 04:52 | If you haven't done any kind of
special formatting ahead of time,
| | 04:54 | you type leading zeros and they disappear, and
some people discovered that with zip codes.
| | 04:59 | That's a different issue.
| | 05:00 | You can format those for
zip codes and avoid that.
| | 05:02 | But a different situation here.
| | 05:04 | We've got a whole bunch of numbers like this
and again, imagine thousands of these maybe.
| | 05:09 | You've got to make them look like this.
| | 05:11 | And I hear a little horror stories
every so often where people got a hundred of
| | 05:15 | these and they retype them and
format them as text and so on and so on.
| | 05:19 | There are simpler ways.
| | 05:20 | And what we want to do here is to
simply write a formula that does this for us.
| | 05:26 | This is using a function called Text.
| | 05:30 | We simply want to take this data, comma
and no matter how many entries we have
| | 05:36 | here, let's say whoever has made the
decision here, everything should be
| | 05:39 | displayed as a five digit character, and
wherever necessary put in the leading zeros.
| | 05:46 | So the format will be, double quote and
the text function does require that you
| | 05:51 | put in a format and perhaps a little
bit of knowledge of formatting in Excel is
| | 05:55 | viable here but the simple example here is
pretty straightforward, "000000". That's it.
| | 06:03 | Looks like that.
| | 06:04 | And the other data, which we've been
putting manually, we'll change those so
| | 06:08 | these all works too.
| | 06:09 | So these are in each case here simply
the data to the left with leading zeros.
| | 06:13 | Now, those are text entries and it's
highly unlikely that you need to treat
| | 06:17 | these as values, but if you try to add
these, Excel looks upward first.
| | 06:20 | If it doesn't see any numbers and if you
try to do this anyway, if you overrode what
| | 06:24 | it tried to do there, you would get this.
| | 06:26 | Now, sometimes what you can do too is,
and I wouldn't say this is necessary
| | 06:31 | but you could say let's add these up anyway
but you would have to turn those into values.
| | 06:36 | Another function that occasionally
comes into play is a function called Value.
| | 06:41 | And this takes data like this, which
contains numbers but they're not really
| | 06:45 | values, they are text.
| | 06:48 | We want to convert those all into values,
and because we are trying to do this
| | 06:52 | across multiple cells and get the
total at the same time, this would need to
| | 06:56 | be an array formula, so we'll press Ctrl+
Shift+Enter and that is the total of those.
| | 07:02 | Again, maybe that's a little unusual.
| | 07:04 | You probably won't use that a whole lot.
| | 07:05 | But if here and there you did have
entries that were text entries, you can
| | 07:10 | turn them into values.
| | 07:11 | Possibly here we might do =value, if you want
to do it this way too, on each one of these.
| | 07:17 | We don't have any formatting there,
there we go and just take this down there.
| | 07:21 | So that's another need from time-to-time.
| | 07:23 | Now, here is another issue too and it's
actually related to that first example.
| | 07:28 | You can create your own format and
if you want negatives, I wouldn't exactly
| | 07:32 | recommend it because it's inconsistent
with a lot of other displays in Excel,
| | 07:36 | and it's not an innate one built-in,
but you can create your own format so that
| | 07:41 | for negative numbers
you'll have a trailing hyphen.
| | 07:44 | Now as I click on this, you look in the
Formula Bar, the value of this is -34.56.
| | 07:51 | The format you can create for this, and
there are a quite a few variations, I am
| | 07:54 | simply clicking the right mouse
button here, and going right in the Format Cells,
| | 07:58 | you'll see here a Custom Format.
| | 08:01 | And you can do this pretty easily by
starting with one of the formats here that
| | 08:06 | has two kinds of layouts.
| | 08:09 | Whenever you see a semicolon here, in
one example on each side of it, the one to
| | 08:14 | the left is how the data is
displayed when it's a positive or zero.
| | 08:18 | The entry to the right is how
it's displayed when it's negative.
| | 08:21 | So you might just click one of these,
adjust it slightly, put in a trailing
| | 08:24 | minus and that's simply the
format here for negative numbers.
| | 08:28 | And again, I am not strongly
recommending that, but it is possible to actually
| | 08:32 | have this look and have
it be treated as a value.
| | 08:35 | So in this case, in this situation here,
we've seen a number of different uses
| | 08:40 | of Text functions pulled together.
| | 08:42 | Putting them together in an interesting
way sometimes does allow us to do some
| | 08:46 | really creative things with massaging
our data and getting it into the shape
| | 08:50 | that we really want it to be in.
| | Collapse this transcript |
|
|
11. Financial FunctionsCalculating payments with PMT| 00:01 | In Excel there were over 50 financial
functions on the Formulas tab in the Ribbon.
| | 00:07 | Click Financial and you
will see the names of all them.
| | 00:09 | And if you are in the world of banking
and finance and mortgaging, you certainly
| | 00:13 | have an insight into what some
of these are likely to do for you.
| | 00:16 | Of all the ones you'll see here,
certainly the one that's most widely used and not
| | 00:21 | necessarily by people in that industry
at all is one that allows us to calculate
| | 00:26 | the monthly or yearly or
quarterly interest on a loan.
| | 00:30 | And in cells A1 and A2 are
two typical kinds of scenarios.
| | 00:35 | The first one when someone needs to
borrow some money for a car, say $25,000,
| | 00:40 | wants to pay it off over four
years, has an interest rate of 6%.
| | 00:43 | I put this information in the cells
here just as pure entries right here, and
| | 00:49 | here I want to show how the PMT function works.
| | 00:52 | It is pretty straightforward.
| | 00:54 | =pmt meaning payment. What's the rate?
| | 00:58 | Now, the one mistake that is likely to
be made if you make a mistake in using
| | 01:02 | this function is you
forget to divide this by 12.
| | 01:05 | Now, of course it isn't always 12.
| | 01:07 | 12 means how many payments do you
have per year, or better yet what is the
| | 01:12 | interest rate per payment period.
| | 01:14 | If these are quarterly payments you
would divide by 4, but if it is monthly,
| | 01:18 | probably much more common, /12.
| | 01:21 | Don't forget to put that in there.
comma, nper, the number of periods.
| | 01:26 | If this is a four-year loan, we could
have put 48 in here or since we do have
| | 01:31 | the 4 here, simply this times 12 to
indicate how many payments we have got.
| | 01:37 | Comma. And how much are we borrowing?
| | 01:40 | Present value 25,000. That's it.
| | 01:43 | Our monthly payment, principal,
and interest will be this amount.
| | 01:48 | If you want to plug this into your
family budget it may be a bit awkward because
| | 01:53 | it is displayed as a negative, and
after all it is an outflow of money every
| | 01:57 | month, so that's an appropriate entry.
| | 01:59 | But if you want to work differently
with this, you have two options. You can
| | 02:02 | either put a minus sign in front of
the 25,000 or perhaps better back in the
| | 02:07 | function itself simply precede that PV
entry with a minus if you want to have
| | 02:13 | this displayed as a positive entry.
| | 02:15 | Now you might also want to take this
and build an Amortization Table, and for
| | 02:20 | your information Excel does
have a built-in template for that.
| | 02:23 | You can go to the Office button, and
choose New, and track that down if you wish.
| | 02:28 | That may be to your liking.
| | 02:30 | If you want to build your own, I just
want to show you the beginnings of it.
| | 02:33 | The key entry here will be how much
interest you pay the very first month, and
| | 02:38 | so month by month and you might
have 48 entries here eventually.
| | 02:42 | You want to know for each payment, how
much principle, how much interest, and
| | 02:47 | then the new balance each month.
| | 02:49 | Some people find this exercise a
little depressing but let's say we don't and
| | 02:54 | let's talk about how we might do this.
| | 02:56 | The interest rate for the very first
month will be equal to the loan amount
| | 03:01 | times the borrowed rate divided by 12.
| | 03:06 | Now the principal is going to be the
monthly payment minus this, and if we are
| | 03:11 | thinking how this is going to be
copied down the column as we put in the
| | 03:14 | principle we want to be using cell D7
and make it absolute, and that's always
| | 03:19 | going to be that minus
the interest for the month.
| | 03:23 | So these two together add up to the
monthly payment of 587.13, and the balance
| | 03:30 | each month is reduced by
the amount of principle.
| | 03:34 | So here is the balance minus the principle.
| | 03:39 | You probably want to do one more just to
make sure you got it right, so the next
| | 03:43 | entry down here, remember here on the
principle we were doing what?
| | 03:45 | We were subtracting it from the interest.
| | 03:47 | Now you could bring this down first.
| | 03:49 | It will look funny because we
didn't calculate the interest.
| | 03:51 | But what do we want to do on the
interest here every month from now on?
| | 03:55 | We want to be basing the
interest on the balance this way.
| | 03:59 | Probably what I should have done here
and I could readjust it on this first
| | 04:01 | case here is simply say, instead of that
referring to D6, make it refer to this value right here.
| | 04:08 | So it is referring to the cell that's
over and up one and that means if we drag
| | 04:13 | this down that should be working okay.
| | 04:16 | One more adjustment, the D4
reference should be absolute.
| | 04:19 | Drag that down and since this was a
subtraction in that order, same idea here.
| | 04:27 | We could build our table this way.
| | 04:29 | So dragging this down,
eventually we would see.
| | 04:32 | Drag it to whatever.
| | 04:33 | It's going to be down here and
eventually we will see what's happening, and
| | 04:36 | I didn't quite complete this.
| | 04:38 | We could drag it down this way.
| | 04:39 | We would have to drag it down into row 48
to make this work probably, and it will.
| | 04:46 | Actually a few rows beyond that, and it
will end up at 0 eventually, right at 48.
| | 04:49 | So it is easy to build them fast.
| | 04:52 | Now with a loan for a house,
things are going to be a bit different.
| | 04:56 | Well substantially different.
| | 04:57 | Another variation of what you might
use PMT for and we could do it here in a
| | 05:01 | different way, sometimes you are in an
exploratory mood and so you could build
| | 05:05 | little grid here using PMT, and the
example here maybe you are exploring
| | 05:10 | different possibilities as to how much
you want to borrow, depends on the market
| | 05:14 | of course, and what are the interest rates.
| | 05:16 | So a quick idea here in building this
using the PMT Function, this example what
| | 05:21 | we would like to do and let's say that
in all cases here it is going to be a 30
| | 05:24 | year or 360 month kind of situation.
| | 05:27 | So we start off here with the rate and
looking ahead since every entry in this
| | 05:33 | grid will need to get its entries out
of row 1, we will use the F4 key here to
| | 05:38 | make sure the reference there stays
frozen in row 1 and mixed reference with an
| | 05:43 | absolute reference for the row number.
| | 05:45 | So that's going to be the rate divided
by 12, comma, the constant here will be
| | 05:50 | the 360 right here and we will hit F4
there so that's going to stay constant for
| | 05:55 | all these, comma, and the amount we
are borrowing will vary, but it is always
| | 05:59 | going to come out of column I here.
| | 06:00 | So we will want to press F4 a few times
so that the reference stays in Column I,
| | 06:07 | with the dollar sign in front
of the I, comma, and we are done.
| | 06:13 | And there too if you want that to be
expressed as a positive number I think it
| | 06:17 | would be better in this case to put a
negative in front of this and then copy it
| | 06:21 | downward and copy it across to see the
various rates depending upon the interest
| | 06:26 | and the amount being borrowed.
| | 06:28 | And do keep in mind of course that with
a house the payment we are seeing here
| | 06:32 | is principal plus interests.
| | 06:34 | We are not talking about insurance and
taxes, and you might want to add this
| | 06:37 | onto the end of this or simply
use this as your starting point.
| | 06:40 | So there is no question
that PMT has a role to play.
| | 06:42 | It is absolutely vital, as you
would imagine, in mortgage and banking.
| | 06:45 | But it is widely used outside of that.
| | 06:47 | It is one of the more popular
functions in Excel not used for work purposes.
| | Collapse this transcript |
| Finding future values with FV| 00:01 | How much money will I have after five
years if I pay $300 per month into an
| | 00:05 | account earning 3% interest per year?
| | 00:09 | These are the kind of questions you
sometimes ask yourself. If you understand
| | 00:13 | the math behind this you will realize
it's a pretty sophisticated formula.
| | 00:18 | Fortunately, a number of the financial
functions in Excel do all the work for us here.
| | 00:24 | And in this example we need a
function called FV, future value.
| | 00:29 | Another way to phrase this, how much
more will I make this way instead of
| | 00:32 | putting it in the cookie jar? =FV.
| | 00:37 | In this example 3%, that may be
optimistic depending upon which time of year
| | 00:42 | it is and which year it is, but
let's choose that as an example.
| | 00:45 | And since most kinds of situations like
this are likely to be monthly, I want to
| | 00:50 | make sure that 3% interest is
translated into a monthly rate, /12.
| | 00:56 | The number of periods here, we are
talking about 5 years times 12, 60 comma and
| | 01:03 | how much are we putting into
the account each month, 300.
| | 01:06 | So, after 5 years how much will we have?
| | 01:09 | Now, a quick math in your head says 5, 12,
that's 60 times $300. $18,000 if we simply
| | 01:16 | hold onto it and did nothing with it,
and instead we get this much.
| | 01:22 | And the information is expressed in
a negative way. That is technically
| | 01:25 | correct but I think a lot of people would
prefer to have this be displayed as a positive.
| | 01:29 | So quick change there.
| | 01:31 | You put a minus in front of the 300 to
express the number as a positive number.
| | 01:36 | Now, a variation on this,
you see the question on row 14.
| | 01:40 | How much money will I have after five
years based on a $15,000 deposit into an
| | 01:45 | account earning 3% interest per year?
| | 01:48 | We are not going to do anything with
this other than deposit it and watch
| | 01:52 | and see what happens.
| | 01:54 | =fV(, once again we use 3% here.
| | 01:58 | 60 months just do it directly this time.
| | 02:02 | Now, in this case we are not
depositing anything, so we don't put anything in
| | 02:05 | there, in this example here, for PMT
but we do have a present value of $15,000.
| | 02:12 | Like in the prior example we want to
make this a negative. We are using a
| | 02:15 | different argument in
the function here, $15,000.
| | 02:17 | With that going to be equal to after
5 years, and we see the answer there.
| | 02:26 | Now you could probably do this
mathematically pretty easily and you could show
| | 02:29 | what it is year-by-year simply by
using caret symbol above number six and
| | 02:33 | compounding it that way.
| | 02:35 | A lot of people know how to do that
sort of thing, but this certainly gets us
| | 02:37 | the answer pretty quickly and it
does show the different variation on it.
| | 02:41 | And what I did here in second example
using a starting value could be used in
| | 02:46 | the example up above too.
| | 02:48 | For example, what if the money you
are putting into this account, you are
| | 02:51 | starting with $1000 balance to begin with.
| | 02:55 | So following the -300, just before I do that,
let's remind ourselves the answer here that
| | 02:59 | we saw previously. 19,394.
| | 03:02 | But what if we start with $1000? Comma and
to be in sync with the other negative, -1000.
| | 03:10 | So that's the money that's already
there and so instead of the 19,000 that we
| | 03:15 | saw earlier, that was 19,394, if we
start with $1000 and then add $300 every
| | 03:21 | month, how much will we
have at the end of 5 years?
| | 03:23 | This is the amount.
| | 03:25 | And let's say in the example here we
don't have a choice on the rate. Now 4% is
| | 03:29 | probably too optimistic
for some of these numbers.
| | 03:30 | But still, what if we wanted to build a
grid here showing what will happen if we
| | 03:35 | put in $300, then $325, what's
going to be the variation here?
| | 03:40 | Now, the numbers here are already in
place, but let's show how to create these.
| | 03:43 | And you will make your own judgments as
to what kind of variations you want here.
| | 03:47 | If you want to do this every $10 just
to show what it might be like here, so
| | 03:51 | every $25 and this represents the years here.
| | 03:55 | How would we build this?
| | 03:57 | =fv, and we will use this percent
right here, and if we are going to be
| | 04:02 | copying this downward and the rightward, we
will always want to be referring to that cell A5.
| | 04:07 | So by pressing F4 to make this an
absolute reference, divide that by 12, we are
| | 04:13 | talking about monthly payments here
comma and now the period of the loan.
| | 04:18 | It is going to come out of A6 and all
the others that we will be using here will
| | 04:22 | come out of column A as well.
| | 04:23 | So by pressing F4 repeatedly we will
get the dollar sign in front of the A,
| | 04:28 | meaning that part will become
absolute, the row number will change.
| | 04:31 | So we want that to look $A6, and that
represents year so we need to multiply
| | 04:36 | that by 12, comma and how much we are
inserting for our deposit each time,
| | 04:42 | it is going to be coming out of row 5 here.
| | 04:45 | The first time it is going to be B5
and here too we want to use a mixed
| | 04:49 | address to make sure that the row portion of
this, the 5, remains absolute but not the column.
| | 04:55 | So pressing F4 repeatedly
gives us this look eventually.
| | 04:59 | And here too we want this to be
ultimately expressed as a positive number.
| | 05:03 | So we will make this entry negative.
| | 05:05 | So that would be the master formula
here and then we can just double-click to
| | 05:09 | copy this downward and then drag across
to see what those different combinations
| | 05:15 | of a deposit amount and the number
of years adds up to. Powerful stuff.
| | 05:20 | Pretty easy to get to with
the Future Value function, FV.
| | Collapse this transcript |
| Determining total amount of future payments with PV| 00:00 | An important function when it comes
to investments is the PV function.
| | 00:05 | Question at C1 stated, what is the
present value of monthly payments of $2000 at
| | 00:12 | 6% annual interest I will be
making over the next 360 months?
| | 00:15 | That's probably talking about a house here.
| | 00:18 | What's that money worth right now? There it is.
| | 00:21 | How do we get to this value?
| | 00:23 | The function is pv, =pv.
| | 00:27 | 6%, and in nearly every financial
function that deals with rates, if it's
| | 00:34 | anything related to payments, more
often than not it's related to the monthly
| | 00:37 | payments, so we will divide by 12.
If it were quarterly, we divide by 4, and if it
| | 00:42 | were yearly, we wouldn't put any
division in, over 360 months, 2000.
| | 00:46 | That's the present value of
those payments we will be making.
| | 00:52 | And as in many cases, although that is
technically the correct answer, to make
| | 00:57 | that appear and perhaps be able to
want to use it and plug it into other
| | 01:00 | formulas, that would probably work better
for most people if it were a positive entry,
| | 01:04 | so a quick edit here.
| | 01:06 | Put a minus in front of the amount here,
and it gets displayed as a positive entry.
| | 01:12 | Another use for the PV function is
expressed in Row 6 with the question,
| | 01:17 | how much money do I need to invest now if
I want to have $150,000 in ten years?
| | 01:23 | Well, if you're confident that you can
get 5%, you need to have $92,000 available.
| | 01:29 | 6%, 7%. Are we talking stock market here
or some other scheme that you are sure you
| | 01:35 | know it's going to work?
| | 01:36 | I am sort of making fun of the
idea that we are not always so sure.
| | 01:39 | But let's show how we can come to this
value here by way of the PV function, =pv(.
| | 01:49 | We want to be referring to
this 5% right here, comma, 10 years.
| | 01:54 | We are not going to be
making any payments here, 0.
| | 01:58 | We would like to reach $150,000.
| | 02:02 | Be sure not to put a comma after the 150.
| | 02:06 | If you work with financial functions
you wouldn't do that, but sometimes you
| | 02:09 | slip up a little bit.
| | 02:10 | So what do we need here?
| | 02:12 | That's the same value we saw before.
| | 02:13 | Once again, it's negative, so ideally
what we would do here, most people would
| | 02:16 | put a negative in front of
this so we get this value here.
| | 02:20 | Now, if we would like to test this
out for the other amounts here, we can
| | 02:23 | simply copy this or double click it
to copy it down a column to see how this
| | 02:28 | stacks up with other rates.
| | 02:29 | If we are confident we can get 10%,
then this would be our starting point.
| | 02:33 | This is how much money we need to
invest if we are going to get 10%, to have
| | 02:37 | $150,000 in 10 years.
| | 02:40 | So here are some valuable
uses of the present value.
| | 02:43 | That's the PV function in Excel.
| | Collapse this transcript |
|
|
12. Information FunctionsWorking with the IS information functions| 00:01 | If you work with Excel functions a lot,
you are probably aware of the fact that
| | 00:04 | on the Formulas tab in the ribbon,
there is a category under More Functions
| | 00:08 | called Information Functions.
| | 00:11 | And variety of these begin with the
word IS and they are ideally used for
| | 00:16 | cleaning up data, testing data.
| | 00:19 | It makes certain kinds of functions
easier to read and easier to deal with.
| | 00:23 | And many of these are almost self-explanatory.
| | 00:26 | Let's mention a few of
them right at the beginning.
| | 00:28 | I put these right here
just for reference point.
| | 00:30 | But on the screen here, you'll
see ISTEXT, ISNUMBER ISNONTEXT.
| | 00:34 | I recall situation a few years ago
where I was adding of some data and I had
| | 00:38 | simple Sum function and I am
adding up numbers like this.
| | 00:42 | Now there are 9 entries here, and they
are all over 2000, so it's going to be
| | 00:46 | rough math in your head about, 20,000 or so.
| | 00:49 | But it's only 15000.
| | 00:51 | Now if you have bee working with Excel,
you can probably see what's going on here
| | 00:54 | and I've rigged
this example a little bit.
| | 00:56 | But if you look closely you'll realize
that the entry right here looks narrower
| | 01:00 | than the others and
looking again more closely.
| | 01:02 | If you're familiar with it, the number
one that typically appears in Excel
| | 01:06 | and there's a one up there in that
1999 and you see how it looks and that
| | 01:10 | really isn't a one.
| | 01:12 | That's a capital I or it's a
lowercase l. We don't necessarily care.
| | 01:17 | Here's a different one here.
| | 01:18 | So one of these 2. It's a capital I or
a lowercase l. It's certainly not a 1.
| | 01:24 | Now, when you are doing data entry, you
should avoid aligning data until you're
| | 01:29 | finished with the data entry.
| | 01:30 | Now, I know sometimes you are never finished.
| | 01:32 | But stay away from the idea that you
want to align the data, because Excel
| | 01:36 | performs a nice service for us.
| | 01:37 | I am going to go back to the Home
tab here and turn off Right alignment.
| | 01:41 | When you don't have any alignment
buttons selected, entries that contain
| | 01:46 | non-numerics are automatically left aligned.
| | 01:49 | They are considered text entries.
| | 01:51 | That's a capital O, this is either a
lowercase l or a capital I. We don't
| | 01:56 | necessarily care here.
| | 01:58 | When you see other numbers around,
of course you make the comparison.
| | 02:02 | That's an O clearly over here and
over in column G not exactly nearby but
| | 02:07 | that's two zeros there
and we see the difference.
| | 02:10 | But when data has been aligned and you
got thousands of entries, sometimes these
| | 02:13 | things aren't as clear
as they might want to be.
| | 02:15 | And I'm not suggesting you're going to
be using all three of these at the same time,
| | 02:19 | but a quick check of
here, how this might work.
| | 02:23 | Sometimes you'll just use this function
with nothing else to it other than this
| | 02:27 | and we're going to get a true or a false.
| | 02:30 | Now this is a data entry here. Is that text?
| | 02:34 | No, it's not.
It actually is a value.
| | 02:36 | How about the others here?
| | 02:37 | And it's pretty obvious that is text,
that is, that is, after that explanation that is.
| | 02:43 | And similarly, in other situations it's
more appropriate or it's just clearer
| | 02:47 | to say, is this a number.
| | 02:50 | Now in some cases, you might want
to be using this with IF functions.
| | 02:53 | I am going to put it inside of an IF
to check and see if it is a number.
| | 02:57 | You want to do some calculation otherwise.
| | 02:59 | Maybe you want to put in a temporary value.
| | 03:01 | Here we'll do these all at once
=ISNUMBER and we'll be looking at the same
| | 03:05 | cells and when we build the formula
this way, the function just refers to the
| | 03:10 | first cell, hit Ctrl+Enter, all of
these will go in at the same time and you
| | 03:14 | see this happening.
| | 03:16 | In other situations,
it might be clear to do this.
| | 03:19 | You'll get the same kind of answers, =ISNONTEXT.
| | 03:25 | Same general idea, click here, hit Ctrl+Enter
and there are some others of a similar way too.
| | 03:31 | And it will make sense, at certain
points to be using these along with the IF
| | 03:34 | function to take different courses of action.
| | 03:37 | Maybe the approach here is going to
be if there's a score here where we
| | 03:42 | possibly are going to increase it by 10% or
multiply by something or maybe just use it.
| | 03:47 | But if it's blank maybe, we want to put
in an indicator or a temporary value or
| | 03:52 | zero or something like that.
| | 03:54 | So many times the IF
function will come into play.
| | 03:56 | And one way to do this, and not
necessarily the best way, would be to say
| | 04:02 | if this cell is blank.
| | 04:05 | In other words, if this equals and a
programming kind of way, I am not trying to
| | 04:11 | put them in a programming sense.
| | 04:12 | But one way to do this is to say if
this is equal to double quote double quote.
| | 04:17 | Sometimes that's called the null string.
| | 04:19 | In effect is it empty and if it is,
maybe we'll just put in the value 0 here, or
| | 04:24 | we'll put in number like 99, just
something for whatever the situation calls for
| | 04:29 | and if not maybe we will simply take
the score, we will do nothing with it special,
| | 04:33 | just put in as it is and we could
copy this down the column and you can
| | 04:38 | see pretty quickly what's happening here.
| | 04:39 | Every time there's a blank
cell, we get a 99 instead.
| | 04:42 | Now it might be clear and for some
people, it will be clear to say instead of
| | 04:47 | saying all this, why don't we use this
phrase isblank this G2 here, and skip
| | 04:55 | that equal double quote,
double quote stuff? There we go.
| | 04:59 | If this cell blank and it's just clear
and easier to read and sometimes that's
| | 05:04 | what we are looking for in formulas.
| | 05:06 | It's a little bit better
documentation, even if you had never seen it.
| | 05:10 | You make the educated guess, yeah,
that's checking to see if that cell is blank
| | 05:14 | and of course, the same answers as
we saw and it just might be clearer.
| | 05:18 | And at different time using the IF
function along with these other indicators
| | 05:22 | here would be appropriate as well.
| | 05:25 | So again, use them as you need them,
but I think in general, they're likely to
| | 05:28 | be used for cleaning up data,
scoping out data to see what's going on and
| | 05:33 | you'll get the complete list of them
on the Formulas tab under More Functions
| | 05:37 | and under Information.
| | Collapse this transcript |
| Using error-checking functions: ISERR, ISERROR, IFERROR| 00:00 | There's a certain kind of information
functions in Excel that for want of a
| | 00:05 | better term that we might
call error checking functions.
| | 00:09 | On the Formulas tab, in the ribbon if
you click More Functions, and then go to
| | 00:12 | Information, you will notice a
function called ISERR, ISERROR.
| | 00:19 | You'll also see a function
called ISNA and there's one called NA.
| | 00:24 | But let's explore some of those in this
selection and very often, but certainly
| | 00:27 | not always these are used
along with the IS function.
| | 00:30 | There's also a new function in Excel
2007 that goes by the name ISERROR and
| | 00:36 | you'll see how this plays out in
comparison with some of the other functions
| | 00:40 | that have been around in Excel for awhile.
| | 00:42 | Here's a worksheet,
nothing too unusual about it.
| | 00:44 | It's heavy with formulas. I could
quickly hit Ctrl+Tilde here, no Shift key.
| | 00:49 | I readjust the column width and you'll see
pretty rapidly there are tons of formulas.
| | 00:54 | What happens sometimes when you're not
thinking ahead or it just doesn't occur
| | 00:57 | to you, and I'll hit Ctrl+
Tilde and readjust the columns.
| | 01:01 | Who would have thought that a formula
here that's calculating profit change from
| | 01:06 | month-to-month, here's an example, this
particular formula. You probably learned
| | 01:10 | something like this, back in the
sixth grade, before you were using Excel.
| | 01:14 | If you made $20 profit or $20,000
profit, whatever it is here, for April and
| | 01:18 | then the next month, you make 40,000.
| | 01:20 | That's a 100% increase.
| | 01:22 | And you see what's happening in other months.
| | 01:24 | We are tracking Sales Changes, Expense
Changes, Profits Changes month-to-month
| | 01:29 | and then it just so happens that on a given
month, maybe this number is getting adjusted.
| | 01:33 | I am going to make the expenses here
be equal to the sales for this month.
| | 01:36 | So simply make that 240 and that's
going to turn the profits into 0 and you see
| | 01:41 | what's happening down here.
| | 01:43 | This formula is now trying to divide by
0, which of course is an impossibility
| | 01:48 | and that's why we get the DIV/0 error.
| | 01:52 | Now, what do you do in a situation like this?
| | 01:54 | Some people just leave it here. It is true.
| | 01:56 | It's accurate.
| | 01:57 | It doesn't apply in this case.
| | 01:59 | But if you're going to be making a
presentation or you are going to be printing this.
| | 02:02 | Usually you don't want people to be
asking questions or you don't have to
| | 02:06 | explain this unnecessarily.
| | 02:07 | You would probably like
to have a different answer.
| | 02:09 | So there are a couple of
different approaches here.
| | 02:12 | Now, what I am going to do is change
this formula and the, as you would expect
| | 02:15 | we would be copying this into the three
cells to the left and to the right to
| | 02:19 | cover other potential situations as to
what might happen here when this is 0.
| | 02:24 | Another aspect of this too, which I
don't want to cover but you can imagine
| | 02:27 | wanting to cover is, if these go negative
then you are going to be coming up with
| | 02:31 | some very unusual answers too
that you might want to screen out.
| | 02:34 | Let's just focus on the idea
here that we have an error.
| | 02:38 | Here's one approach to this and this
is the time honored to the traditional
| | 02:41 | approach in Excel before
2007, which still works.
| | 02:46 | A function used within the IF function
and in English here is what we want to say.
| | 02:51 | If this calculation somehow
comes up with an impossible kind of
| | 02:55 | calculation that will be an error,
| | 02:57 | we'd rather not see this.
| | 02:59 | So right here, in front of the
function but after, the initial parentheses
| | 03:04 | we want to say iserror().
| | 03:11 | If all that is in error, what do we want to do?
| | 03:14 | A lot of us would want to put in
nothing, in which case it would be "",
| | 03:19 | just leave it blank.
| | 03:20 | Other people might prefer to put in as NA.
| | 03:24 | And a third option, not so obvious,
is to use a function called NA.
| | 03:29 | Like all functions, it's
followed by parentheses.
| | 03:32 | The difference will be this will have a pound
sign on the view that may not be to your liking.
| | 03:35 | But that's what it will do.
| | 03:37 | So the logic so far is if this
calculation is going to give us an error,
| | 03:42 | we want to display this or there are two other
options you might have seen and it's your choice.
| | 03:48 | If not, we actually, want to see this.
| | 03:51 | I don't want to type that again, so I
am going to highlight this, hit Ctrl+C or
| | 03:54 | the Copy button is
available for Home tab at present.
| | 03:56 | Ctrl+C, click out here, Ctrl+V, there
we go and one final parentheses and
| | 04:03 | it certainly makes the
formula look longer and so on.
| | 04:08 | And as is often the case, happens to
me too for sure, yes, I'll accept this.
| | 04:13 | Usually this gets it right.
| | 04:14 | Yeah, and that's what we want
to see, not too many parentheses.
| | 04:18 | In Excel 2007, there is a new function.
| | 04:22 | I am going to write it under
here, so we can compare the two.
| | 04:25 | But instead of having to repeat
that over and over and over and let me
| | 04:28 | temporally put a space in front of it and
just leave it there, so we can see this text.
| | 04:32 | I'll make the column wider too, there we go,
so we can see that at least temporarily.
| | 04:36 | We will do the same formula over again,
with the new function IFERROR, and
| | 04:41 | this makes it substantially shorter.
| | 04:43 | But what we want to do here is to say
if this calculation, this left parentheses
| | 04:48 | F4-E4 and that's all, so I'll
just click on the cells up here.
| | 04:54 | If this minus this, right parentheses
divided by this, if that is an error or is
| | 05:02 | it that we want to do? I don't know.
| | 05:03 | What's the value when that's an error?
| | 05:06 | Maybe we'll just put in the NA, like
we did before, to be in sync here and
| | 05:12 | we don't have to indicate what we do otherwise,
because it will simply use this calculation.
| | 05:18 | So we are all done here, expect for the
final right parentheses, and there's the
| | 05:22 | answer and displaying it momentarily,
so I can compare it with the other one.
| | 05:26 | A lot shorter, a lot easier
to read and just more succinct.
| | 05:29 | And as soon as you discover this, any
other situations where you had been using
| | 05:33 | the longer version, which is required in
future versions of Excel, this is a lot better.
| | 05:38 | The ultimate end is the same.
| | 05:40 | You either want to display an NA as a
function or possibly nothing or you have
| | 05:45 | different approaches here, and what
I am going to do is simply move this here,
| | 05:48 | drag it with the right mouse button,
do a move there, looks like that.
| | 05:52 | And in real life situation, of course,
we would copy this to here, and what
| | 05:56 | happened here is it did copy the format.
| | 05:58 | So before I do much more here, what I
am going to do is copy this format to here,
| | 06:02 | and then recopy this, there we
go and copy to left of this as well.
| | 06:08 | So the other numbers won't really
change, but it does cover these situations.
| | 06:11 | So this is certainly one
approach to doing this.
| | 06:14 | Now, when you have the NA in
different situations, if you're trying to
| | 06:18 | evaluate this, if you have this
entered as a function and that's what I did
| | 06:22 | here by putting this in.
| | 06:23 | If you have formulas elsewhere that
somehow need to refer to that, you can use
| | 06:28 | this function =isna.
| | 06:33 | Does that have an NA?
| | 06:34 | We know it does here, this might seem
rather obvious to do that, but it says true.
| | 06:38 | Let me wind it up with that column
properly. All the others up there well,
| | 06:42 | of course, they are not and
that's what you see there.
| | 06:44 | Now, I'm not really pursuing this any
further, other than to say you can check
| | 06:48 | for the existence of ISNA.
| | 06:50 | Now, there's another
small variation on this too.
| | 06:53 | If you're looking at data in one
location from another location, sometimes you
| | 06:58 | want to check if it's an error and
you will notice in a sort of subtle
| | 07:02 | distinction, but at least be aware of it.
| | 07:03 | There is the ability to say ISERROR
or ISERR and what's the difference?
| | 07:13 | ISERROR, as it says below, will check to
see whether a value is an error and
| | 07:21 | you see in parentheses in the pop-up tip
here all the things that it looks for, and
| | 07:25 | what's the difference
between that and using just ISERR?
| | 07:30 | It doesn't check for the Na.
| | 07:33 | Subtle difference, probably won't make a
whole lot of difference to most people
| | 07:36 | but just be alert of the fact
that there is a difference there.
| | 07:40 | But I think the bigger question might be,
| | 07:42 | why are we using this at all if the
new function called IFERROR is around?
| | 07:46 | I think it's a better approach.
| | 07:47 | So just some ideas here behind
checking the accuracy of information and
| | 07:53 | somehow screening out the kinds of things you
don't necessarily want to show on your worksheet.
| | 07:57 | I know some of you wouldn't want to see this.
| | 07:59 | A reminder once again by going
back to this particular function here.
| | 08:03 | Maybe we don't even want to show this.
| | 08:05 | Maybe we want to show nothing.
| | 08:06 | How about double quotes, double quote?
| | 08:09 | So different situations where you can
use these functions at your own discretion.
| | Collapse this transcript |
| Getting data from remote cells with OFFSET| 00:00 | As you look at the data in columns A
and B and also the information in columns
| | 00:04 | D and E, you can imagine what we are
trying to set up in this particular worksheet.
| | 00:09 | Column A will grow and grow and grow as
will column B. We're tracking a closing rate,
| | 00:15 | maybe it's stock market, maybe
some kind of futures market, some kind of
| | 00:18 | number that's vital to our interest
and we want to track the information and
| | 00:22 | maybe we've been tracking it for only
months but for years, so column A could
| | 00:26 | get quite long. And elsewhere not
necessarily in the same worksheet, we always
| | 00:32 | want to have the latest entry right here.
| | 00:35 | And so if for example here, if the next
entry is going to be the 10th year,
| | 00:38 | I'll just drag it this way.
| | 00:40 | We'd like to see this be the 10th and
if the next number our here is going to
| | 00:43 | be 267 or whatever,
| | 00:45 | we want to see that right up here in
cell E2 as we set up here on the screen
| | 00:50 | and it's not changing.
| | 00:53 | Now there's an unusual function and I
say unusual because like certain kinds of
| | 00:58 | functions you might just gloss right
over it if you happen to encounter it.
| | 01:02 | It actually is part of the lookup and
reference category of functions and if you
| | 01:06 | happen to click this button on the
Formulas tab in the Ribbon and come to
| | 01:12 | OFFSET, look at the description.
| | 01:14 | It returns a reference to a range that
is a given number of rows and columns
| | 01:19 | from a given reference.
| | 01:20 | And it's definitely programming-
like in nature and that's certainly is
| | 01:25 | insufficient in terms of explaining
exactly what this does and yet that's just
| | 01:30 | what we need in situations like this.
| | 01:32 | So instead of the manual entry here,
let's put in a function that will and this
| | 01:38 | is going to be OFFSET function, of course.
| | 01:40 | That will always keep track of the
latest entry as they start to appear here in
| | 01:46 | column A consecutively after
the existing entries. =offset.
| | 01:55 | Now the reference is going to be
to the cell starting in cell A1.
| | 02:01 | How many rows down do we need to go?
| | 02:03 | This is going to vary.
| | 02:05 | If we put information in A9, we'll have
more entries than we have there now and
| | 02:09 | obviously this will keep adding
and that's going to be the case.
| | 02:12 | So what we need next is some way
count how many entries we have in column A
| | 02:18 | and some of you are familiar with the
function CountA. And just CountA.
| | 02:24 | That counts text entries in column A. And
right away you're probably thinking what is
| | 02:31 | in that counting A1 as well? Yes it is.
| | 02:33 | That's all right.
| | 02:35 | Subtract one, do not count that.
| | 02:38 | That's how many rows we want to move
downward and you're probably saying
| | 02:42 | yourself, what is the value of CountA
looking at column A? The value is 8.
| | 02:48 | We subtract one and so we're looking at 7.
| | 02:51 | So what we're we about to say here?
| | 02:53 | From position A1, move
down, how many rows? Seven.
| | 02:59 | How many columns do we move
to the right? None, zero.
| | 03:04 | In other words, we don't
want to move into cell A9.
| | 03:07 | We essentially want to move
into A8 and grab that data.
| | 03:13 | And we see this and a quick test of this occurs
| | 03:16 | is so what if we do put in
a different data after this?
| | 03:23 | Immediately this is reacting.
| | 03:24 | Now once again looking at the
logic of this, what are we seeing?
| | 03:27 | We're always looking at A1 as the
count of entries in column A goes up.
| | 03:33 | That's one bigger than the offset that we need.
| | 03:36 | For example, right now we need to go
into cell A9 and pick up that value.
| | 03:41 | This is telling us there are nine entries.
| | 03:44 | We want to subtract one
so this moves down eight.
| | 03:47 | And remember the nice shortcut too.
| | 03:48 | When you're evaluating formulas, you
can highlight a portion of it and simply
| | 03:53 | hit F9 to see what that's equal to.
| | 03:56 | It really helps understand certain functions.
| | 03:59 | So, of course, now nine minus one would
be eight, move down eight cells from A1
| | 04:03 | that would take us down to A9.
Don't bother with the column 0.
| | 04:06 | We could even leave that
off, and we don't hit Enter.
| | 04:10 | We'll just hit Escape to
adjust it and the same idea here.
| | 04:14 | I could even copy this.
| | 04:15 | If I drag it it's going to copy the format.
| | 04:17 | Another way, I might just copy this here,
right-click over here, do a Paste Special.
| | 04:23 | Don't copy the format but just the
formulas over there into E and this should be
| | 04:29 | set up automatically too.
| | 04:30 | And that's picking up the wrong-- well,
not exactly the wrong entry yet because
| | 04:34 | we don't have any number here.
| | 04:36 | Let's put in a number down here
and now we see how that works.
| | 04:40 | Now you could say in a certain sense
this is a specialized function but the use
| | 04:45 | as it's seen here is the powerful one.
| | 04:48 | If you do some exploring in various
Excel Help menus, you'll see the OFFSET
| | 04:52 | function being used for describing
dynamic range names. That might be worth
| | 04:57 | looking into on your own.
| | 04:59 | This is certainly one of
the more powerful uses of it.
| | 05:01 | At first, it seems a little obscure
but it's easy to understand the more you
| | 05:05 | look at it and it certainly
gets done what we need to get done.
| | 05:08 | And this is going to work for a long,
long time particularly if you get a
| | 05:12 | situation where you keep adding dates,
keep adding information to column A, keep
| | 05:16 | adding information in column B, it's
always going to pick up the last entry.
| | 05:21 | When you've got situations like this too,
make sure you don't have empty cells
| | 05:25 | in there because then it's
going to mess up the count.
| | 05:27 | If you have only one, possibly you can
make an adjustment and not subtract the
| | 05:32 | one and somehow work around
that but here's the basic idea.
| | 05:35 | This is the Offset value right here,
the number of rows to move downward, and
| | 05:41 | the number of columns to move rightward in some
cases. Like in this not at all. It's not an issue.
| | 05:44 | So a great tool when you need it.
| | 05:47 | It's the OFFSET function.
| | Collapse this transcript |
| Returning references with INDIRECT| 00:00 | On the screen, we're looking at a worksheet.
| | 00:02 | Its name is called Indirect-1.
| | 00:05 | It's actually a summary
worksheet and there is one that is great
| | 00:09 | three-dimensional formulas
in cell B3. It looks like this.
| | 00:13 | This is adding up the other B3 cells on
all the other sheets named East through
| | 00:19 | West and the Sheet tabs are
East, South, Midwest and West.
| | 00:24 | All sheets, cell B3 on every one
of them, we're getting nice total.
| | 00:28 | Now, what we might also want here, and
you can imagine how if we had many, many sheets,
| | 00:33 | one for each state, one for
each city within a cluster of city,
| | 00:37 | something like that, we might have many,
many sheets using this kind of a model.
| | 00:41 | All these sheets have the same layout.
| | 00:44 | Now, as it turns out on all these sheets,
the total for each of the regions is
| | 00:48 | going to be on cell G6.
| | 00:51 | Now, it would be nice if we could
simply put in a formula right here
| | 00:56 | that gets the data from the East and if
you're doing this manually, this would
| | 01:00 | probably be as efficient as anyway.
Rather than copying and pasting, build the
| | 01:04 | formula at the destination.
| | 01:07 | This is where we want to see the data.
| | 01:09 | Equal, then click on the East sheet,
click on the cell in question, and color
| | 01:15 | out there and simply hit
Enter, and that's what we see.
| | 01:20 | If you look at the formula, you'll
see that it refers to sheet names with an
| | 01:24 | exclamation point. We see that there.
| | 01:27 | Now, a very unusual function in Excel
and it's one of those that I have seen so
| | 01:32 | many descriptions over it that just
don't do justice, and it always seems a
| | 01:36 | little bit strange, is a function
called INDIRECT, and many times the way it's
| | 01:42 | described-- and let's actually use this
from the Formulas tab under Lookup &
| | 01:48 | Reference, INDIRECT. Returns the
reference specified by a text string, and that
| | 01:57 | doesn't tell us a whole lot, does it?
| | 02:00 | Here is one example and this will
not ring true. I'm going to put a cell
| | 02:04 | address here, for example, B4.
| | 02:09 | If I use the INDIRECT function and refer it
to this cell, the answer is going to be 2,710.
| | 02:22 | So by referring to D9, which has a
cell address, it's going to use that
| | 02:28 | you might say indirectly, in gathering
the data. This in cell B4 it's 2,710 and
| | 02:35 | I'm sure many of you would be saying,
and I know I said when I first saw this,
| | 02:38 | well, why would I ever use that?
| | 02:40 | That doesn't really make any sense.
| | 02:43 | Well, let's go back to this idea
here. What would be efficient here
| | 02:47 | and particularly if we had many, many
sheets but even here it's going to be efficient.
| | 02:52 | Why can't we just take this kind of
a setup here and copy this formula
| | 02:57 | downward into other cells?
| | 03:00 | If we could somehow pick up these names as well.
| | 03:03 | So what I'd like to do first of all
to help with the example is to just move
| | 03:08 | this over here, edit it, put a space
in front of us, so we can just remind
| | 03:13 | ourselves what it looks like.
| | 03:14 | So I am temporarily turning that into
a non-formula so we can see it here.
| | 03:18 | Now, if we use the INDIRECT function
to pick up the word East, then we can
| | 03:23 | construct essentially this kind of a
formula and then if we copy it downward,
| | 03:28 | it's going to pick up the word South,
and Midwest and West, give this a shot,
| | 03:33 | =indirect, left parenthesis and we want
to get the data from here and looking at
| | 03:41 | the formula over in E9 as reminder.
| | 03:43 | What do we want to come after the word East?
| | 03:46 | Within double quotes we want to get
the exclamation point and then G6.
| | 03:50 | Don't really have to capitalize it.
| | 03:51 | It looks better, G6, double
quote and that's the answer.
| | 03:59 | A quick jump over to the East sheet
just to make sure, there it is, 17,980.
| | 04:05 | And of course, quick formatting here.
| | 04:07 | Maybe just copy this one down there.
| | 04:08 | We'll drag it with the right mouse
button, format, looking good, and if we
| | 04:12 | double-click here, we've got
our totals for the others as well.
| | 04:16 | Again, at first looking a little
strange and I'm thinking and begin to see this
| | 04:20 | has some merit here.
| | 04:22 | I do have model like this that
uses all the states and of course it's
| | 04:25 | very efficient there.
| | 04:26 | We do this once and copy it down into
50 other entries. It works beautifully.
| | 04:30 | So the INDIRECT function
has some real power here.
| | 04:33 | There's another power tool with this
that is even more impressive and let's move
| | 04:37 | into the next sheet to the right.
| | 04:39 | It's called Indirect-2, second example here.
| | 04:42 | On this worksheet the entry for
column A is labeled State, the entry for
| | 04:46 | column B is labeled City.
| | 04:49 | A real popular feature in Excel these
days is the pick list idea, by the way
| | 04:54 | of data validation.
| | 04:56 | Let's imagine in this particular
scenario, the company has offices in various
| | 05:00 | states, does businesses in various
cities within those states, and to speed up
| | 05:05 | data entry and to make life more
efficient here, what we would like to be
| | 05:09 | able do in column A is first of all setup
a list of entries that must be state names.
| | 05:15 | So I am going to zoom in a little bit up here,
so we can see this little bit more clearly.
| | 05:18 | The state names in question are right here.
| | 05:22 | If you haven't used data validation,
it's a great feature, often very
| | 05:25 | straightforward, but in column A or the
range you are interested in, go to the
| | 05:30 | Data tab, Data Validation, setup a
Data Validation rule and what we want to
| | 05:37 | allow in column A here is information
that only can come from this list, and
| | 05:44 | what's the source of that list?
I'll move this over, just these cells here.
| | 05:49 | These are the only states we do business in.
| | 05:52 | Click OK, and that's a simple
single-level data validation.
| | 05:56 | Anytime we click here, we get
to pick one of these states.
| | 05:59 | There is a scrollbar here
and there you need that so on.
| | 06:04 | Now for each state there is a
different list of possible cities. For Illinois
| | 06:09 | is these cities right here and for Ohio of
course, these are a different set of cities.
| | 06:13 | What we now want to do is another level
of data validation, based on what's in
| | 06:19 | column A. When we come to Illinois here,
we want to get a drop arrow that shows
| | 06:23 | only the Illinois cities.
| | 06:25 | We come to Ohio we want to see a
drop arrow that only shows us those.
| | 06:29 | We want the data validation entries in
column B to be based on what's in column A.
| | 06:35 | Now, the missing ingredient here is
how we make a reference to this and what
| | 06:41 | we have to setup also is range names.
In other words we want a range name for
| | 06:46 | Illinois that essentially refers to
these cells, and a range name for California
| | 06:51 | that refers to these cells.
| | 06:54 | As I scroll rightward a bit, one
problematic issue is the different states have
| | 06:58 | different numbers of cities in them,
but we won't let that stop us, and I might
| | 07:03 | zoom back a little bit, so we
can see all of these cities.
| | 07:05 | California for example has
more cities, there we go.
| | 07:07 | So here is what we'd like to do, and
rather than painstakingly create range names,
| | 07:12 | we want to take advantage of a
capability here that lets us apply either
| | 07:17 | the top row, bottom row, left
column, right column, as the name.
| | 07:23 | So in this case here we're going to
be highlighting all of these cells and
| | 07:28 | on the Formulas tab, Create from Selection,
automatically generate names from the selected cell.
| | 07:36 | The names we're going to create
will be taken from the left column.
| | 07:41 | So what we've done now is
defined A Z to be a range name.
| | 07:46 | That consists of these cells right here,
all the way up to column O, in every
| | 07:51 | case it's all the way up to column O,
and that's a slight irritant, which
| | 07:55 | we'll see in a bit.
| | 07:57 | Now, what pulls this together is the
fact that now we want to setup data
| | 08:02 | validation here and for every state, we
need to be looking into the cell to its left.
| | 08:08 | If we do this for the entire column,
we'll be making a reference to A1 and A1 itself.
| | 08:14 | We'll use that simply because
as we start here is to the left of B1.
| | 08:19 | So it works better when you
highlight the entire column.
| | 08:22 | It just makes it more efficient.
| | 08:24 | So in column B we want to setup another
data validation rule using a list, but
| | 08:34 | the source of the list will be =indirect.
| | 08:38 | We are going to be using cell A1,
even though literally A1 is not in
| | 08:44 | question but by inference any cell
we're using in B1 will automatically
| | 08:48 | refer to the corresponding cell in A1,
and that's why we'll get this funny
| | 08:52 | message as we click OK here.
| | 08:54 | It sends a shudder through some of us.
| | 08:56 | We see it the first time, the
source currently evaluates to an arrow.
| | 08:59 | Do we want to continue?
| | 09:00 | Yes, we do, and we're ignoring it.
| | 09:03 | So now Illinois, we click here.
| | 09:06 | We're only seeing the
Illinois cities. There they are.
| | 09:10 | That will be Chicago.
| | 09:12 | Ohio, we're only seeing the Ohio cities.
| | 09:15 | Now the scrolling here is the irritant that I
alluded to and we'll adjust that in a second.
| | 09:19 | Maybe that Cincinnati.
| | 09:20 | We've got Colorado here, and more of the
Colorado entries, and you'll see what's happening.
| | 09:24 | Every single time, we're getting only
the cities from the appropriate state.
| | 09:29 | Now, what is annoying is that because
we've got these blanks for some states,
| | 09:34 | a lot more in fact blanks
for every state, except California.
| | 09:38 | What we'd like to do is effectively take all
the blanks here and essentially get rid of them.
| | 09:45 | Now they are part of the range name definition.
| | 09:48 | So an obscure but powerful tool off
the Home tab, the extreme right most
| | 09:54 | button, Find & Select, Go To Special,
let's select these blanks, blank
| | 10:00 | cells within that range. There they are.
| | 10:03 | Let's right-click on them and delete them.
| | 10:06 | Delete just the blanks and
shift those cells leftward.
| | 10:12 | Now that was the least critical of
all this, but now for example here,
| | 10:16 | we'll make an entry, pick a different state,
Illinois again, click there, drop arrow.
| | 10:21 | It's much easier to read.
| | 10:22 | We don't have to worry
about seeing just a few of them.
| | 10:25 | It's just a cleaner version
of what we've seen earlier.
| | 10:31 | Let's fill these in.
| | 10:31 | There is no way to have done this
without the INDIRECT function, and again
| | 10:36 | recognizing it's a little bit obscure,
if you go through these steps as you are
| | 10:40 | trying this, you can see
the enormous appeal of this.
| | 10:43 | You might call it the double data validation
definition here, to again allow people
| | 10:48 | to pick items out of a list,
rather than boring typing.
| | 10:52 | It's a great feature.
| | Collapse this transcript |
|
|
ConclusionGoodbye| 00:00 | Hi! This is Dennis Taylor.
| | 00:03 | Thank you for watching and listening to
these videos on Excel Formulas & Functions.
| | 00:08 | I am sure that after watching these videos
you are a much more confident user of Excel.
| | 00:12 | You know a lot more about functions.
| | 00:15 | And in the future, I think you are
going to be less intimidated by what you
| | 00:18 | see in Excel, and particularly if you
have those challenges where you need to
| | 00:21 | manipulate data and come up with totals
that you just found a bit illusive in the past.
| | 00:26 | I wish I could help each one
of you on a one-to-one basis.
| | 00:29 | We can't really do that of course,
but it's been a pleasure presenting this
| | 00:33 | information, and perhaps we'll
together again soon in another course.
| | 00:37 | Thank you!
| | Collapse this transcript |
|
|