8 hours 33 minutes
in this module. I will be talking about my crow's what? Our day.
and how are they used? So you will learn about types of my crows are there how to define variables in Mac Rose? How to use message boxes about if then else, if struck else else if structure but Loops
did the end, I'm going to
example on how to fully look excel sheet or a worksheet or filed and similar uses of micro. So we're going to go into detail with some real life examples on what to do in macros
in first lesson within this module. Ah, let's talk about types of macros.
So microbes represent the best way to automate your excel file. And when I say automate, there are two levels of to automation. 1st 1 is
everyday tasks that are
they can be put in a group
you can put in the macro,
and then, instead of repeating 1234 or five or mawr tasks that are
the previous one
every time you're using them. Ah, you can
simply record them,
and then call them upon with key stroke or or pressing a button.
Ah, and of course, room 17. Mac, Rose and function Christian. We're going toe deal with each one of those.
So let's start with an example.
And here we have a simple calculation. Now it can be much more complex, but it really doesn't matter for the
purpose of this demonstration.
So you have
Colby. And in currency
you have a
And it's simple. It's not in a ray function. It's nothing, just the simple calculation. So we basically
did this. We created this cell. The double click. We have these.
Now we're sending this file to somebody and we don't know.
I don't want them to get the formulas we just want to get, want them to get the data
and, uh, or for whatever reason, we just don't need any formulas anymore. We're just on the fixed data here.
So how would we do it
We copy these cells,
who pays them here as values.
Sorry. We copy them here.
We face them here,
And then we delete this.
There are other ways to do it, but it doesn't matter. So we did it.
now we want
to go back
and automate this thing.
In order to do that, we first have to
enable macros, which are by default, disabled.
And he if you
have some basic skills
in excel, you know that we go to the options,
we go to the customize ribbon,
and then we click on developer
check it in.
And now we get the developer,
And now we go to record my crew
and is going to give us the name. Option two,
give the name to it.
by default is going to be macro one micro too. But we're going to call it
Korpi, constants, whatever.
it's going to be controlled. Plus,
for example, shift in
you can put here description if somebody else is going to look at this file, but
it really doesn't matter.
So and you click, Okay?
Oh, yeah. And the name has to have underscore
there instead of space.
And now we do whatever we have to do. So control, see
Then select this,
then copy here
and then we go to stop recording.
And now if you go back,
you know, have formulas here
and then I press control shift. And
it does. You see, the you have seen the short flicker on the screen when it was
copying and deleting cells, but that's it.
this is how we do the basic recording of a macro
and historically looking before there was a visual basic for applications.
This was the only thing you could do with Mac Rose.
you have seen
in this first part of this lesson how to record a simple macro Now, this can be much more complex.
It can involve all sorts of functions.
But in the end,
it is just
recording what you're doing in excel and putting it in Ah
ah, one routine that repeats that,
Um, Now, if we
look a TTE the Mac rose and you want to edit it,
we will get
we will get this
so it will create
17. That's called copy constants without any parameters.
And then it will be selected range.
And these are the
that they're, uh
doing what you I have been doing with within the Excel file. So it's electing range. See, Want to see five.
Then selection copy means is being copied.
uh, we're selecting range in the one.
And then we're selection pay special based.
And these air the explanations off
it has done
with all the parameters.
Then we're against selecting
cut copy Mon fils Were selection copy
selection pay special meaning it's spacing.
We told the parameters needed.
And then we select the range D
clear content and we're ending the sub routine.
So this is how it's working. So you have any programming knowledge?
This is a simple program
that is doing these things now. We could have done these things much simpler
if we were writing.
But we're going to talk about that in
ruins off this lesson in next video.