Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/DustinPetersen/VBA-Scripts

Useful VBA scripts when working with Excel documents
https://github.com/DustinPetersen/VBA-Scripts

Last synced: 9 days ago
JSON representation

Useful VBA scripts when working with Excel documents

Awesome Lists containing this project

README

        

# Usefull VBA Scripts

## Copy data from one file to another
Very useful macro, as it shows how to copy a range of data from inside vba and how to create and name a new workbook. You can easily upgrade it to fit your own requirements.
___

## Show hidden rows
Occasionally, large Excel files contain hidden lines for better clarity. Here’s a macro that will unhide all rows from an active worksheet:
___

## Delete empty rows and columns
Blank rows in Excel are a problem with data processing. Here is how to get rid of them
___
## Find a blank cell
Finds black cells
___
## Replace empty cells with a value.
blank cells interfere with data processing and the creation of pivot tables. Here is a code which replaces all blank cells with 0. This macro has a very large application because you can use it to find and replace N/A results, as well as other characters such as dots, commas or duplicate values:
___
## Sort numbers
macro sorts in ascending order all numbers from the active cell’s column. Just double click any cell from a column you would like to sort. NB: You need to put the code in Sheet 1 and not in a module to work:
___
## Remove empty spaces
Occasionally, data in the workbook contains additional spaces (spaces) that can interfere with data analysis and to corrupt of formulas. Here’s a macro that will remove all the spaces from a preselected range of cells:
___
## Highlight duplicated values
Sometimes there are duplicate values in the several columns we would like to illuminate. Here’s a macro that does just that:
___
## Highlight top ten values
This code will highlight the top ten values from a selection of cells:
___
## Highlight greater than values
When you run this code, a window will prompt. It will ask you the value you want to compare the cells you have selected.
___
## Highlight cells with comments
A simple macro that highlights all the cells that contain comments:
___
## Highlight Cells with Misspelled words
This is extremely useful when you work with functions that take strings, however, someone entered the string with a mistake and your formulas are not working. Here is how to fix this issue:
___
## Create a pivot table
Here is how to create a pivot table from MS Excel (2007 version). Especially useful, when you are making a custom report every day. You can optimize the pivot table creation in the following way:
___
## Attach active workbook in an Email
My favorite VBA code. It lets you attach and send the file you’re working on with a predefined email address, message title, and message body! You first need to set reference to Microsoft Outlook (in your VBA editior, click on tools => references and choose Microsoft Outlook).
___
## Send all Excel charts to a PowerPoint presentation
A very handy macro that lets you add all your Excel charts in your Powerpoint presentation just with a single click:
___
## Send Excel table in MS Word
Excel tables are usually put inside text documents. Here is an automated way of exporting your Excel table to MS Word:
___
## Extract a specific word from a cell
reate a custom Excel function with VBA. This is one of the most iportant VBA functionalities, because it lets you create your own functions that are non-existent in MS Excel. Let’s go on and create two functions: findword() and findwordrev().
___
## Protect your Workbook
protect the data in our file so that only we can change it
___