How to check for duplicates in Excel Workbooks using VBA?

Step #1: Identify the Excel Range First off, open your Microsoft Excel spreadsheet and identify the cell range in which you would like to check for duplicates. Your range could be across single or multiple spreadsheet columns. Step #2: Write your VBA Code Next, in your open Excel workbook, hit ALT+F11 or hit the Developer … Read more

How to set Excel text font color with VBA?

In this tutorial we’ll learn how to use Visual Basic for Applications (VBA) to modify text size and style in an Excel cell based on the cell content. This tutorial apply for Excel 365, 2021, 2019 and 2016. Preliminaries If you are new to Excel VBA development, I’ll recommend that before going through the tutorial … Read more

How to set an Excel cell color according to a condition with VBA?

Applies to: Microsoft Excel 365, 2021, 2019, 2016. In today’s VBA for Excel Automation tutorial we’ll learn about how we can programmatically change the color of a cell based on the cell value. We can use this technique when developing a dashboard spreadsheet for example. Step #1: Prepare your spreadsheet If you are not yet … Read more

How to set an Excel spreadsheet column width with VBA?

Updated: August 2021; Works on Excel 365, 2019, 2016. In today’s Excel automation tutorial we will learn how to quickly change the width of a worksheet column as needed – but programmatically using VBA (Visual Basic for Applications). Prerequisites In order to write VBA code, you’ll need to first and foremost, ensure that your developer … Read more

How to make a Macro in Microsoft Visio?

Here’s a question from Danny: I have recently started using Microsoft Visio to make use of diagrams, layouts, and charts. I understood that i can improve my productivity by automating much of the common work across different diagram / drawing files by using Office Macros. As i am pretty new to VBA development, i would … Read more

How to work with Message and Input Boxes in PowerPoint VBA?

Going through the comments, i have seen a couple of reader questions on how to work with Visual Basic Input and Message boxes in PowerPoint. In this tutorial we’ll provide a very basic foundational knowledge to help you use those capabilities when automating your presentation creation. Setting up the Developer Tab First off, we’ll need … Read more

How to subset a dataframe by one or multiple columns?

When trying to make sense of a large DataFrame in Pandas, you might need to subset it by columns and rows. In this tutorial we’ll show the most prevalent use cases of column partitioning your DataFrame. Create an example DataFrame We’ll start by setting up our example DataFrame, which we’ll do by running the following … Read more