Showing posts with label Utils. Show all posts
Showing posts with label Utils. Show all posts

Sunday, November 30, 2025

Excel Timer Macros

In this post we review several options to create a timer with Excel VBA macros. There are basically three functions that allow to track time in Excel: Application.OnTime method, Timer VBA function, SetTimer function of the user32 library/Windows API.  Furthermore, there are many locations where the timer can be placed. In this post we see how to add the timer to a cell, a text box or shape, an activeX control, the status bar, and a userform.


Tuesday, September 19, 2023

5 Ways To Get Data From Google Sheets In Excel

There are several ways to import data from Google Sheets into Excel. In this post we review five different methods to import data from Google Sheets using Excel VBA. One way or another, there is always a HTTP request to the Google web resource that connects with the Google spreadsheet. The main difference between the various methods presented here lies on the Google web resource/API URL used to access the data. Another important difference is the format of the output data. Some methods allow to get only public data, while other may also let import private or restricted data.

 

Tuesday, March 28, 2023

Excel Ribbon Customization

We can easily customize the Excel ribbon manually and hide certain tabs or add new tabs and buttons. However, the customization does not persist if we share the Excel workbook with other users; it only applies to the local copy of Microsoft Excel. We need to modify the XML code to export the customization with the file. That’s especially helpful when creating Excel add-ins. In this post we see how to customize the ribbon manually and locally, and how to modify the XML code to customize the ribbon programmatically and permanently for a given workbook. Find the list of ribbon image icons in this other page: Microsoft Office ImageMSO Icons


Saturday, September 24, 2022

Excel Data Export To Google Sheets

Exporting data from Excel to Google Sheets can be automated with VBA macros. In this post we see how to set up a Google spreadsheet to receive data from Excel through a Google Form. The macro to upload or export Excel data to Google Sheets is fairly simple and is explained in this other post (Upload Data To Google Sheets). This article focuses on the process of adding a Google Form to the Google spreadsheet, adding the fields to the Google Form, and getting the necessary arguments to build the URL link needed to send the server request.


Thursday, August 4, 2022

Excel Macros in Google Sheets

Yes, it's possible! In this post we see how to create Excel macros in Google Sheets, and more specifically, we compare the two leading spreadsheet applications side by side in regards to automation and creation of macros. It is possible to replicate Excel macros in Google Sheets in many cases, yet there are some limits to achieve everything we do in Excel. On the other hand, macros in Google Sheets allow to easily integrate with other Google APIs and web resources, and can even be taken to another level to create entire web applications. However, the programming language we use to code the macros is quite different altogether. Microsoft Excel uses Visual Basic for Applications (VBA), while Google Sheets uses Google Apps Script (JavaScript). This post will help you leverage your Excel VBA knowledge to quickly get you up to speed with creating macros in Google Sheets.


Tuesday, May 17, 2022

Excel Standalone Application (Mortgage Calculator)

In this post we see how to create a standalone Excel application or form using VBA macros. The application is built on a UserForm that will show up on its own when opening the file; the Excel workbook will be hidden in the background. This is useful to create independent Excel apps or forms connected to data and/or formulas and calculations in the main Excel workbook. As an example, we will create a simple mortgage calculator in Excel. The mortgage information is directly entered in the Excel app or form, with the option to calculate the scheduled mortgage payment. The calculation is actually happening through a formula in the hidden worksheet (it could also be done with macro code instead).


Saturday, May 7, 2022

Excel Multiple Dependent Validation

Adding a drop-down to a cell in Excel (also known as validation) is fairly straight-forward. But adding interdependent drop-downs is slightly more difficult. In this post we review several methods to create multiple dependent validation lists in Excel. We will start with a classic and simple way to do it that does not require any VBA macros. However, the classic way to create multiple dependent validations is a tedious process and may take some time in order to create the necessary lists, tables, names, etc. Therefore, we will also look into an alternative to create the dependent validation using VBA macros. In this case, the macro could be adapted to accommodate as many fields as needed, thus being ideal for multiple dependent validation. As an example, we will create a validation list to select countries, regions, and cities of the world.


Wednesday, April 20, 2022

10 Ways to Run a Macro in Excel

Come along to see 10 different ways to run a VBA macro in Excel. This could be a recorded macro, or a macro you’ve created or copied into a standard module. The macro must be a public procedure in a public module, otherwise most of the methods won’t work. Any standard module is public unless specified otherwise. A public procedure starts with Sub or Public Sub, as opposed to Private Sub. 


Sunday, January 28, 2018

Excel Shift Roster Generator

Find an updated version in this post from Excel Macro Business.

In this article we look at a simple way of automatically creating work shifts schedules in Excel. Nothing we couldn’t do manually but can save some tedious work instead. It’s a good example to understand how to work with different sheets, use loops, simple calculations and format the data with VBA.


Popular Posts