- [Instructor] Let's talk about data types in Excel
and why they're important.
This sheet is a great example,
because it contains all sorts of data types.
There's text, there's numbers, there's dates.
Excel does a really good job at figuring out
what data type to use when you're entering data into a cell.
For example, if I type a word,
I'll use my trusty word Apples and hit the Tab key,
it's left formatted.
This is telling me
that it's just treating it as a text string,
but watch what happens when I put in a number.
I'll hit the Enter key,
and the text stays to the right.
That's how Excel knows that it's a number or a value field.
And by that, I mean a date, an integer,
a time, a currency,
any sort of value that's not a straight text field.
And the reason it's important
is because it's going to decide
what kind of formula or function you can do on that cell.
For example, if I move over to the Formulas ribbon tab,
there's Financial functions that I can do.
There's functions that you can do on text,
for example, to transform text directly into a cell.
You can do calculations based on date and time cells.
But it needs to know what is what.
Let's take a look at these date cells.
You can enter dates in different ways.
For example, I can type this.
I can see that it's right-aligned.
In fact, if I go over to the Formula bar,
I can see that it's completely expanded the date.
Depending on what local you're set to,
Excel will adjust the dates accordingly.
For example, it may swap these two values.
I can also write a time.
And again, it's right-aligned,
and if I go to the Formula bar,
I can see that it is in fact a time.
You can choose and format
the type of data cell that you want.
I'm going to click and drag and highlight these cells,
which are clearly currency.
If I go back to the Home ribbon tab,
right there in the middle of the tab,
I can format the data type and set it.
It's set to general right now,
but I can click the down arrow next to this button
and set it to currency.
In fact, I can even choose what type of currency I want,
though, it will default to whatever locale I use.
In fact, I can click this dropdown
and choose Currency or Accounting.
Here's Currency.
And if I choose Accounting,
Accounting is much more formal and standard.
I can even format the way it looks.
For example, I can increase or decrease
the amount of decimals used,
I can add a comma as a thousand separator,
I can add a percentage sign,
I can set all of these cell formats.
I can do it per cell, I can do it per column or row,
whatever is going to work for me
to do the type of calculation that I need.
For example, this cell is reporting the days
since the gift card was issued.
I can see up here,
it's a simple formula that's calculating today's date
and subtracting it from the value in this cell
when the card was issued.
These are the types of calculations you can do
when you have the type properly set.
So always be on the lookout in the back of your mind
if something doesn't look quite right.
For example, I'll put in the time again,
but, here, I can see that it's still left-aligned.
That's because it didn't quite recognize
that I was putting in a time.
Although, if I had put a space in here after the PM
and hit the Enter key,
now it figures it out and adjusts accordingly.