fbpx
Search
Close this search box.

All articles with 'using Ranges' Tag

Split an Excel File in to Many using VBA [Videos]

Published on Oct 19, 2011 in VBA Macros
Split an Excel File in to Many using VBA [Videos]

Splitting an Excel file in to many is easier than splitting bill in a restaurant among friends. All you need is advanced filters, a few lines of VBA code and some data. You can go splitting in no time.

Context:

Lets say you have lots of data like this in a file. And you want to split this in to multiple files, one per salesperson.

Solution – Split Data in to Multiple Files using Advanced Filters & VBA

The process of splitting data can be broken down to 4 steps …,

Continue »

How to use Cells, Ranges & Other Objects in Excel VBA

Published on Aug 31, 2011 in VBA Macros
How to use Cells, Ranges & Other Objects in Excel VBA

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

Continue »

Understanding Variables, Conditions & Loops in VBA [Part 2 of 5]

Published on Aug 30, 2011 in VBA Macros
Understanding Variables, Conditions & Loops in VBA [Part 2 of 5]

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 »