First VBA program

When you create an Excel macro, it automatically defines a new subroutine, which is actually a program that runs after the specified action. You can also create subroutines independently which could be called from other programs, or run in the manner described below. This text will show how a simple code is written and how it is then linked to the objects that are used to launch it.

Variables, data types, constants …

Variables are placeholders within computer memory that are aimed to store values ​​of different types of data, such as: numbers, text, logical values, date/time … Although this is not necessary, for better memory utilization, you need to declare them at the beginning of the program and assign them a data type. Variables that will have fixed values ​​during program execution are called constants.

Introduction to VBA

VBA (Visual Basic for Applications) is a programming language that exists “under the hood” of MS Office applications. Therefore, it is a part of Excel and allows users to create new features, introduce additional functionality and automate work with spreadsheets. This is the first of the posts in which I will try to teach you the basics of VBA programming. Important advice: before you decide to write code learn Excel and try to find out if what you want to get is already there!

Mekko chart

Mekko chart is a type of Stacked Column chart where columns are expanded in such a way that series are merged, so it’s an excellent choice to show sales through market segments. In most cases, we will use 100% Stacked Column, and there is also a subspecies of this chart called a ridge, which is actually a Stacked Column with a peak emphasized by a bold line to emphasize the trends …

Population pyramid chart

Population pyramid is a subclass of the Bar chart chart that is conenient when we need to show results of the research in which we compare two populations. Most often we compare the percentage representation. These can be answers, in relation to the age, how many survey members responded with the “YES” and how many with “NO”, we can compare the number of men and women which belong to a certain population, etc.