Macros & Excel VBA

How to Save Excel Macro Files with Filenames from Cell Values (2 Methods)

Dataset Overview To demonstrate the methods, we have taken the following dataset of the Sales history of some products in a shop. Method ...

Using Excel VBA to Return the Row Number of Value – 5 Methods

Method 1 - Using the Input Box Enable the Developer tab on the ribbon. Click: How to Show the Developer Tab on the Ribbon. Steps Go to the ...

Using Excel VBA to Save a Workbook as a New File in the Same Folder – 3 Examples

The sample Excel workbook contains 3 worksheets: ‘VBA-1’, ‘VBA-2’ and ‘VBA-3’. Each worksheet contains the same dataset (B4:D8). To save a new ...

How to Clear Contents Without Deleting Formulas Using VBA in Excel: 4 Methods

Method 1 - Clear Contents from Range Without Deleting Formulas Using VBA in Excel STEPS: Go to the Developer tab and select Visual Basic. It ...

Excel VBA to Clear Contents of Range (3 Suitable Cases)

Consider a dataset where you may want to reuse existing cells. You can use VBA code to clear the contents of an Excel file. Here's an overview of our ...

How To Open Folder and Select File Using Excel VBA: 4 Examples

Example 1 - Using GetOpenFilename to Open Folder and Select File Option 1 - Setting Variable as Variant Steps: Go to the Developer tab. ...

How to Open a Workbook from a Path Using Excel VBA – 4 Examples

This is the sample dataset. Example 1 - Using the VBA Workbooks Method to Open a Workbook from a Path in Excel Steps: Open your ...

How to Save a Copy as XLSX Using Excel VBA (5 Suitable Ways)

We have taken a simple and concise dataset that has 3 columns and 6 records of students' marks to show how to save it as an XLSX file. ...

Excel Macro to Create New Sheet and Copy Data (4 Examples)

Before demonstrating the examples of Excel macros to create new sheet and copy data, let's first learn how to add and apply a macro to a Workbook. ...

Using Excel VBA to Populate an Array with Cell Values – 4 Examples

The sample dataset showcases Month, Cost, and Sales. Example 1 - Applying a While Wend Loop to Populate an Array with Cell Values in Excel ...

How to Browse for File Path Using Excel VBA (3 Methods)

Method 1 - Using FileDialog to Browse for File Path in Excel VBA Steps: Select cell C4 where the file path will be saved. Go to the ...

Excel VBA: Save and Close Workbook Without Prompt

Some Excel files need frequent saving and closing for various reasons, where having to respond to an Excel prompt each time is an unnecessary ...

How to Open a Workbook and Run a Macro Using VBA (4 Methods)

Method 1 - Using Workbooks.Open Method Open the Visual Basic Editor by going to the Developer tab and clicking on Visual Basic or by pressing ...

How to Open Another Workbook and Copy Data with Excel VBA – 4 Examples

You have two Excel files, Copying Data with VBA.xlsm is the Source File containing the data you want to copy, and Sales Report.xlsx is the ...

How to Open the File Dialog Default Folder with Excel VBA – 3 Methods

Method 1 - Using the VBA FileDialog Property to Open the File Dialog Default Folder Steps: Press ALT+F11 to open the VBA Module window. ...

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo