- [Instructor] Remember this spreadsheet
from way back in the beginning of the course?
Let's rearrange some data.
The first thing I'm going to do
is make these columns a bit wider
so that they're easier for you to see.
And we know we can do that now
by clicking and dragging to select them all,
and sliding them.
Remember, I can slide just one of them
and it's going to resize all of them.
Something very common
that you might want to do in Excel
is rearrange rows or columns.
That is, maybe I want to group these wattage products
right next to each other.
The easiest way to do that
is to either select the entire row
by clicking on the row number,
or if I had data to the right of this
and I don't want to move that data,
I can select the data that I want
by clicking and dragging.
Now, I'll slowly move my cursor
to the very top of the cell,
and the cursor is going to change
to a crosshair icon.
When that happens,
I can hold the Shift key down on my keyboard
and click and drag up with my mouse.
I'll let go,
and it's instantly swapped the contents of both cells.
Now, a gotcha is if I do that
and forget to hold down the Shift key.
I'm going to do the same thing,
but if I don't hold down the Shift key,
this time, I'm prompted that there's already data in here.
And if I click OK,
it's going to completely override
what was in that cell.
I'll undo that by hitting Control Z.
There is another way to do this,
and this may be more comfortable for you.
There's no right or wrong,
but I can always insert a row,
and copy and paste the data in.
For example, I'll select this row here
and I can either click the Insert button
or right-click and choose Insert.
Here's my row.
And now I could cut this entire row
either by using the scissors icon
to hit Cut from the home ribbon tab,
or Command X.
And now I can hit Command or Control
if you're on Windows or Mac
to paste it in,
and then delete this row.
So this is a bit time consuming,
but if you can't remember that Shift command,
it's always an option.
We can do the same thing with columns.
Let's suppose, for whatever reason,
I want to put 2020 before 2019,
I'll select the entire column
by clicking on the column letter.
And now, again, I'll move the cursor
all the way to the left-hand side
until it changes to a crosshair.
Now, it's important that you don't do that on the letter,
because remember, that's only going to resize the column.
So I'm doing it in this cell itself.
I'll hold the Shift key down,
drag, let go,
and it swapped the contents of those two columns.
So that's how you can move
and rearrange rows and columns easily
by either dragging with your mouse
or using the Cut, Insert and Paste method.