Sunday, October 18, 2020

Get Info Of Selected Files Excel VBA Macro

This macro example triggers a dialog box to select files in windows explorer and then shows file name, date created, and file size information for each of them in the active worksheet.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Crop Selection Window Excel VBA Macro

This macro example crops the Excel active window to fit the selected range. It does the trick with some useful properties of the Application and ActiveWindow VBA objects.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Friday, September 18, 2020

Simple Digital Clock Timer Excel VBA Macro

This macro runs a clock timer in Excel. The user can start/stop the time, and the clock shows minutes and seconds. It is a simple example to learn how to use the OnTime method of the Application object. 

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Copy Selection To Other Workbook Excel VBA Macro

This is a simple example to copy the selected range into a newly created workbook. We use object variables to easily manage both workbooks. Then we save the new workbook in the same location and close it.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Saturday, August 29, 2020

Add Shapes To Selection Excel VBA Macro

This macro adds a rectangular shape to each cell of the selected range and shows the text of the cell in the shape. It can be useful to quickly convert a particular range of a data set into a formatted label.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

List All Files In Folder Excel VBA Macro

The following macro example triggers a dialog box to select a folder in windows explorer and then lists all files within that folder in the active worksheet.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Tuesday, July 21, 2020

Copy Filtered Data To New Sheets Excel VBA Macro

Excel offers filter options to easily narrow down the data. This macro example activates the filter option in VBA and copies the filtered data for each unique entry to separate sheets.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Remove Unused Rows And Columns Excel VBA Macro

Excel worksheets can accommodate data across thousands of columns and more than a million rows. However, in many occasions we use only a handful and may want to just present our data set and get rid of all the useless rows and columns. This example removes all unused rows and columns in a worksheet.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Friday, July 10, 2020

Open Workbook Safely Excel VBA Macro

Excel VBA generates and error if the file we try to open does not exist. It also display an alert and breaks the code if the file is already open. This macro checks for those two conditions before actually opening the file.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Add Button To Fit Selection Excel VBA Macro

This macro adds a control button that fits into the selected range in the active sheet. The code can easily be leveraged to add several buttons using loops, for example, if we want to add buttons to each cell within a column.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Monday, July 6, 2020

List And Link All Sheets Excel VBA Macro

It may be useful sometimes to have a list of contents in the spreadsheet as we often do in word documents. This macro example lists all sheets in a workbook and adds a hyperlink to quickly access each of them.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

List Defined Names Excel VBA Macro

Excel allows to define names that can be used in formulas instead of cell references. This macro example lists all defined names and formulas in a workbook.


Tuesday, June 30, 2020

Sort Sheets Alphabetically Excel VBA Macro

Some Excel files contain many worksheets that we may need to put in order for easier access. This macro example sorts all sheets in a workbook alphabetically from A to Z. Use the code below to sort sheets alphabetically with Excel VBA.
 
Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

List Unique Entries Excel VBA Macro

We can easily filter data within columns in Excel. Sometimes we need however to get the list of those unique entries Excel is showing to filter through, so here’s a macro that gets that list for us. Use the code below to get the list of unique entries with Excel VBA macros.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Friday, June 26, 2020

Highlight Duplicates Excel VBA Macro

This example shows how to highlight duplicates with Excel VBA. It uses a For Each loop to check if any value in a given range selection is repeated across the selection. In that case, it highlights all cells with the same value.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Delete Blank Rows Excel VBA Macro

Cleaning up and arranging a data set is always tedious job, but Excel macros can do the job for us. In this example we see how to delete blank rows with Excel VBA. It is a simple macro example to understand programming loops and conditional statements. Use the code below to delete blank rows in Excel.

Learn all about Microsoft Excel and VBA macros in Excel Macro Class with plenty of Excel macro examples and VBA learning materials. Find useful Excel macros to automate your daily tasks and work in Microsoft Excel.

Popular Posts