Author: Vitosh

VBA – How to locate a value in an Excel row?

Most probably you feel like you have a good clue already how to locate a value in a given Excel row. There are plenty of ways – Find() , looking through the cells one by one, looking through the Internet for

Tagged with: , , ,

How to declare as decimal in VBA

More than 3 years ago, I wrote an article about floating point numbers in Excel and a tiny problem with those, concerning all floating point numbers. This article is actually a nice one and it is worth reading – What

Tagged with: , ,

VBA – Convert Month Name to Number and Vice Versa

Convert number to name – [3 -> March] Converting month number to name in VBA is actually coming out of the box with the MonthName() function, which is built-in the stanard VBA  library:

The result is not flabbergasting, but

Tagged with: , , , , ,

VBA Debugging – Video

I have decided to make a 19 minute YouTube video, to explain the basics of VBA debugging, as there are quite a few tricks that not everyone knows. The agenda: Properties Window -> F4 Immediate Window -> Ctrl + G

Tagged with: , , , ,

VBA – Copying Excel worksheet to a new workbook without leaving the old Excel reference

Copying excel worksheets around is actually a piece of cake for a VBA developer (or so they/we think). Mainly because you can record the actions and then “learn” from them, editing a bit the code and etc. Well, there is

Tagged with: , , ,

VBA – Copy Worksheet

Copying worksheet in VBA is actually a trivial task – use the macro recorder see the code and use it further. Anyway, if you are coding professionally with VBA (yup, we still exist:), you somehow get stomach problems, whenever you

Tagged with: , , , , ,

Python – Django Girls – Introduction to Django – Video

Months ago, I was planning to take part in the #RailGirls event in Sofia, and I was even a partner in the event. Anyway, as it was postponed up to somewhere in the future, I have decided to go through

Tagged with: , , ,

Python – Writing Unit Tests with unittest library – Video

In the previous article for abstraction and inheritance I wrote some classes, showing the basics of these two programming concepts. In this one, I will write unit tests for one of the classes, written before. Software testing is an important

Tagged with: , , , , , ,

Python – Abstraction and Inheritance – Video

Abstract classes in Python are classes that inherit from the ABC (Abstract base class). In the video below, I have solved a problem, showing how 2 classes inherit from an abstract class and implement its methods. The abstract class is

Tagged with: , ,

Python – Closure

In this article I am planning to give an answer of the following two questions: What is a closure? A closure is a function, inheriting variables from enclosing environment. Operationally, a closure is a record storing a function together with

Tagged with: , ,

Python – Abstract Methods and Abstract Class – Live Coding Video

Abstract class and abstract methods are one of the pillars of Object Oriented Programming. In Python, an abstract class is a class, inheriting from Abstract Base Classes (ABC) library. And an abstract method is a method of this class, which

Tagged with: , , ,

Python – Permutations and Combinations Made Easy with Itertools

Long time ago, various people, including me, were trying to make permutations and combinations with nested loops and various other “heavy” structures. Anyway, in Python there is a library, which does this for us and sets the end of the

Tagged with: , , , ,

Python – Defining Classes and Methods with Python – LiveCoding Video

Today I have decided to check whether I can pass the first homework from SoftUni OOP with Python, through a live coding session. I have not read the problem before the video, thus I may say it took me exactly

Tagged with: , , , , ,

Python – The End of the Matrix Wandering

Ok. This article is for all the people, who have written code like this one:

When they were solving a problem like this one: You know who you are. You are probably thinking what is wrong with it? After

Python – Making Maps with Cartopy

Cartopy is a Python package designed for geospatial data processing in order to produce maps and other geospatial data analyses. Making a map with Python and Cartopy is actually easier than you might think, but still it has its own

Tagged with: , , , , , ,

Python – Bayes’ theorem – Drug testing example. 99% is not enough!

The Bayes’ theorem is interesting, as far as it is both quite challenging to understand and shocking once you really realize the simplicity of the numbers behind it. It describes the probability of an event, based on prior knowledge of conditions that

Tagged with: , , , ,

Python – Linear Regression

In 2013 and 2014 (wow, already 7 years ago!) I wrote two articles about linear regression with Excel. Now, I am getting more and more interested in Python, thus I guess it would be interesting to remake the article into

Tagged with: , , , ,

Python – Building New Columns in a Dataframe, Based on Other Columns

Working with python, pandas and dataframes is quite challenging even for experienced Excel & VBA developer, as I love to consider myself for one. Thus, today I was fighting for quite some time to add new columns to a dataframe,

Tagged with: , , , , , , , ,

Python – *args, **kwargs and the normal ones (arg)

The good, the bad and the ugly is a famous western. In Python, “the ugly” is probably the **kwargs, as far as it has two stars before it. Anyhow, the idea of *args, **kwargs and arg is simply to pass arguments.

Tagged with: , , , , , ,

Python – List Comprehension

List comprehension in Python is creation of lists from iterables and other lists, following a condition. It is lightning fast and it looks nice, because it is a 1 liner. In this article, I will show a few examples of

Tagged with: , , , , ,

Python – What is the idea of “-1” in numpy reshape?

Today I was “fighting” with the numpy reshape function and I found something strange like matrix.reshape(1, -1). Thus, I have researched quite some time and I found, that the -1 is actually a placeholder for python to change the dimensions of

Tagged with: , , ,

Python – How to write string into a matrix. Printing a matrix.

Writing string into a matrix seems like a non-interesting and somehow trivial task. Anyway, manipulating with matrices and strings in Python is actually somehow interesting, thus I have decided to present a small algorithmic challenge.  The task is pretty much

Tagged with: , , , , ,

VBA – String.Format or how to put variables in a string

C#, Python, Java and all the other “fancy” languages have a built-in method, which writes variables into a string. VBA does not have one. Depending on why do we need it, and if we can guarantee that no injection would

Tagged with: , , , ,

VBA – Make a list of the formula errors in an Excel

Errors in Excel are different – from “Division by Zero” (#Div/0) and #Name to #REF! and #Num.  There are lots of ways to summarize these into some kind of report and in the current article I will show the VBA

Tagged with: , , , , , ,

VBA Boilerplate

Dreaming of having a boilerplate for Excel VBA project? Or you have other dreams, which are more normal? Well, I cannot help in the latter case, but if you want a boilerplate for VBA – here it is!

Tagged with: , ,

C# – Build a .NET Standard library with Visual C# – Video

Following the Microsoft tutorial for building a .Net Standard library with Visual Basic from here, I have decided to make a video for .Net Standard library with C#. Pretty much, it is one and the same. The library contains one

Tagged with: , , , , ,

Writing data from text file to Excel cells

There are quite a few methods for writing data from a text file to Excel. The main are the following: Through a Query Table Through opening the text file and Reading and writing line by line Reading the text file,

Tagged with: , , , , ,

Python – UnitTests in Jupyter Notebook

Unit testing is the “sweet” part of the programming – once you have tested “all the things”, you feel that the code you have submitted somewhere is actually valid and somehow it works. Furthermore, it allows you to nicely brag

Tagged with: , , , , ,

Book Review – Stephen Wolfram – Adventures of Computational Explorer

Some time ago, I have received the book of Stephen Wolfram – Adventures of Computational Explorer for a review. Stephen is the guy behind WolframAlpha – https://www.wolframalpha.com/, a PhD in physics before his 21. birthday, considered a prodigy by some

Tagged with: , ,

VBA – Extracting financial data from a website in table format

Although there are plenty of other tools for extracting data from a website (take a look at Beautiful Soup), VBA is somehow good, because … well, because it is somehow challenging to do it every time. Yesterday, I answered a

Tagged with: , , , , , ,
Top