- [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 they're easier for you to see.
And we know we can do that now
by clicking and dragging and selecting them all
and sliding them.
I can just slide one of them
and it's going to rearrange all of them.
Something that's very common
that you might want to do in Excel
is rearrange rows and columns.
That is, maybe I want to group
these wattage products next to each other.
The easiest way to do that,
and I can 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 only select the data that I want
by clicking and dragging.
Now if I slowly move my cursor to the very top of the cell,
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 instantly swapped the contents of both cells.
Now a gotcha is if I do that
and forget to hold down the Shift key.
I'll do the same thing,
but if I don't hold down the Shift key,
I get prompted that there's already data 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.
And there's another way to do it,
and this may be more comfortable for you.
There is 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,
click the Insert button or right-click and choose Insert.
Here's my row.
And now, I could cut this entire row
by either clicking cut from the Home Ribbon tab
or Command X,
and now I can hit Command or Control
if you're on a Windows or Mac,
paste it in and then delete the row.
So that is a bit time consuming,
but if you can't remember that Shift command,
that's always an option.
We can do the same thing with columns.
Let's suppose for whatever reason
I want to put 2018 before 2017,
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
just until it changes to a crosshair.
Now it's important that you don't do that on the letter,
and this is hard to remember,
but you need to do it in the actual cell itself.
I'll hold the Shift key down,
drag,
let go,
and it swapped the contents of those 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.