All articles with 'macros' Tag
In part 3 of our VBA Crash Course, we are going to learn how to speak with various Excel objects like Cells, Ranges etc. and deal with them.
Objects – what are they?
Any thing and everything is an object. Your dog, your bed, your neighbors cat, their car, your bike, your computer, the shiny new Excel workbook you just created, my website, your email account – every thing is an object.
From our “We are nuts” example yesterday, you can already see these objects:
One awesome owner (that is you)
24 store manager objects
24 store objects
In part 2 of our VBA Crash Course, we are going to learn what Variables, Conditions & Loops are and how to use them in Excel VBA.
What are Variables, Conditions & Loops?
If you are new to computer programming, you might think I am speaking legalese. So, to make it easy to understand, lets assume you run a bunch of stores across the town. To make it colorful, lets call your stores “We are nuts” – a dry fruit and nuts store chain. At the end of every day, you call each of the 24 store managers and ask them how much sales they have made in that day.
Now, you are not the kind of boss who micro-manages & nitpicks. So you don’t really note down sale for every store. Instead, as you call the store manager, you just mentally update the total. So first store says “$2,300″ your total is 2300. Second manger says “$4,000″, the total now will be 6300. So on.
The value 6300 here is nothing but a variable.
We will use the “We are nuts” example thru out this lesson & towards the end we will build a sales logging application using Excel VBA.Continue »
This article is part of our VBA Crash Course. Please read the rest of the articles in this series by clicking below links.
- What is VBA & Writing your First VBA Macro in Excel
- Understanding Variables, Conditions & Loops in VBA
- Using Cells, Ranges & Other Objects in your Macros
- Putting it all together – Your First VBA Application using Excel
- My Top 10 Tips for Mastering VBA & Excel Macros
Hafiz, One of our avid readers, writes in. My problem is when I convert data from text to column using dash “-“, conversion is easy. but when the gap provided in text is with “alt+enter”, I can’t convert the data.
Well, I tried to use text to columns feature (from Data ribbon) and it would not work.
Although you can use formulas to do the splitting, they might become tedious. So the next logical option is to use macros.
In this article, learn how to use VBA to split text on New Line charactersContinue »
Nothing gives a teacher more satisfaction than seeing a student apply the knowledge to do something awesome. So naturally, I jumped with joy when I got this email from Dan, one of my VBA Class students,
After going thru your VBA Classes, I realized that we can lots of awesome stuff with pivot tables + simple macros. I recently created an Excel Dashboard to depict MLB (Major League Baseball) Pitching Stats. I could not have done this had I not learned VBA. Thank you so much for teaching the class.
I got curious and requested Dan, if I could share the file with you all. Being a lovely person, Dan agreed immediately.Continue »
You’ve been there before. It’s almost 5:00, and you are going crazy trying to finish the presentation due for a monthly performance meeting the next morning. The model is refreshed, and now it just takes a LOT of copying, pasting, and positioning to get the PowerPoint ready. Finally, the slides are finished…, until you read a new message from your boss requesting a minor change. But of course her change means you have to start all over with the copy and pastes…
There is always a better way! In the Oil and Gas industry, I constantly have monthly reports to assess the performance of our operating assets. Excel VBA makes it a cinch to automate the entire process. So when a simple change is requested, the presentation is automatically generated with the click of a button. No more wasting time!Continue »
Few days ago, we published an article on how to create interactive dashboards using hyperlinks. Many of you loved this tutorial. But quite a few of you also said, this tutorial is a bit complex to follow.
So, I made a short video explaining how the UDF and interactive hyperlinks work and how our dashboard is weaved together.Continue »
Last week we learned how to create dynamic hyperlinks in Excel. Today, I want to show you something even cooler. An interactive dashboard based on hyperlinks, like shown above.
Isn’t it impressive?
Well, to create something like this, you don’t need a degree in advanced cryogenics. You just need a bunch of data, a chart, a one line macro code and some pixie dust (go easy on pixie dust).Continue »
Recently, I ran a contest asking you to analyze a bunch of sales data and present your results in charts. We received a total of 78 charts from 45 people. The contest entries had a mind-boggling variety of excel charts, techniques and ideas. It took me a while to go thru all the files and compile the results. Thanks for your patience. In this post, you can find all the charts along with my comments & links to download files.Continue »
I have a quick announcement for you.
Registrations for our VBA Class will be closing in a few hours
As you may know, we have opened registrations for our first batch of Online VBA classes on May 9th. This program is aimed at beginners & intermediate level VBA users. The aim of this course is to make you awesome in VBA. We will be closing registrations for this program in few more hours (exactly at 11:59 PM, Pacific time, on 20th May 2011)Continue »
Here is a cool count-down timer application made in VBA to remind you about our VBAClasses registration closing time!
Read the rest of this post to learn how this particular app is built.
If you want to learn VBA, then click here to join our class.Continue »
We have a challenge in our VBA class. Many of the students who join our VBA program have no formal programming background. They may have written a few simple programs long time ago, but most of them lack basic understanding of programming. Teaching VBA can be difficult if we do not address this problem.
So, we have added a lesson on “Introduction to Programming”. In this lesson, our aim is to introduce programming to non-programers.
Since many of you are considering to join our VBA classes, it is appropriate that we give this introduction to programming lesson as a demo lesson. Please watch it below.Continue »
Dear Readers & Friends,
I am very happy to announce that our first batch of VBA Classes is open for your consideration. Please read this short post to understand the benefits of this program and how you can join. Click here to join our class, if you are ready.
What is this VBA Class?
VBA Class is a structured and comprehensive online training program for learning Microsoft Excel VBA (Macros). It is full of real world examples & useful theory.
The aim of VBA Classes is to make a beginner an expert in VBA.
What are the benefits of this class?
Oh so many! Learning VBA one ups your Excel mojo. You will suddenly start saying “Yes” several work opportunities & challenges. Your boss might fall in love with you. You realize the potential to automate large chunks of your work and save time & money.Continue »
Today, I want to quickly share a few things about the upcoming VBA Classes.
I have been running online training programs since Jan, 2010. I have trained more than 900 students till date. Still, whenever I am launching a new program, I could feel that familiar sense of eagerness, tension and tremendous enthusiasm building up. I feel eager because I want to meet you, teach you and learn from you. I feel tensed because I want to do it right. I feel enthusiastic because these training programs give me a lot of new ideas and open-up new possibilities.Continue »
Few days ago, I have asked you, Do you want to learn Excel VBA online? and many of you said YES. So we are starting the program, on next Monday – 9th of May.
VBA Classes is a 12 week online training program that will explain various Excel VBA concepts to you in an easy to understand format. Just like Excel School, we will keep this fun, exciting, interactive and useful. We will learn from each other as much as we learn from this course. To help you understand how this course works, we made a small video. You can watch it and get other details about the program in this post.Continue »