Welcome To Snipplr


Everyone's Recent Visual Basic Snippets Tagged excel



« Prev 1 2
Read data from TXT files to import them in Excel environment
0 1430 posted 7 years ago by buglilorenzo
If you've forgotten a password to an Excel workbook that was created in version 2010 or older. See URL for more details.
0 1426 posted 8 years ago by cueballrawn
Selecting different values from a data validation drop down list will populate the same cell, i.e. it will create a concatenating list separated by commas. Amend the "If Target.Column" values to set the columns this applies to.
0 1483 posted 8 years ago by cueballrawn
Create a custom right-click menu that will list and launch all macros in the DemonstationMacros module. Copy and past the code into the relevant object or module.
0 1533 posted 8 years ago by cueballrawn
Lists all filenames in a directory if you need them for formulae or add into VBA.
1 1424 posted 8 years ago by cueballrawn
Create a bespoke Excel function that allows you to hash (anonnymise / pseudonymise) strings such as unique identifiers. Once you've inserted the VBA, use the function "=BASE64SHA1(cellreference)" to generate the hash.
0 5501 posted 9 years ago by cueballrawn
This code allows you to open an Excel workbook from an Access database and run macros within the target workbook. This could be used to format / clean data prior to import for example.
0 1475 posted 9 years ago by cueballrawn
Hide specific worksheets in a workbook that contain a prefix. This example uses "Admin_", although this can be changed easily.
0 1230 posted 9 years ago by cueballrawn
VBA to unhide all worksheets in an Excel workbook.
0 1316 posted 9 years ago by cueballrawn
Calculates the center moving average for a time period. The vA requires a range or an array of numbers and the iSteps takes the number of periods in the timeframe (4 for quarters, 7 for weekly, ect)
1 1643 posted 10 years ago by BDOGG32
Two functions that can extract text from a string. Must have the Option Compare Text at the top of the module.
2 1394 posted 10 years ago by BDOGG32
Uses regular expressions to do string manipulation. Enter a regular expression into the required parameter and what you want the manipulation to do and it will process the string manipulation. For example if A1 contains John Doe1, Jane Doe2, John W...
2 1445 posted 10 years ago by BDOGG32
Code to turn certain feature off and on for faster running of code in Excel
1 1785 posted 10 years ago by BDOGG32
I wanted a time based gantt chart in excel. Robert's excel template was very useful. The hourly gantt chart was not useful to visualize my needs. I need something with 10 mins precision to analyse patterns in jobs that are running under 15 mins. So t...
0 1181 posted 12 years ago by mprabhuram
This would round down the time stamp to the nearest 5 minute interval based on first interval being 00:00:00.
0 1188 posted 12 years ago by mprabhuram
short loop to load a dictionary
0 1056 posted 12 years ago by lolrenx
Concatenate all text in cells with defined separator
0 1056 posted 12 years ago by lolrenx
quick way to get column headers formatted
0 962 posted 12 years ago by lolrenx
consider currentregion as a 'datarange' custom class
1 1184 posted 12 years ago by lolrenx
Copy rows based on criteria to a new sheet or file
0 1240 posted 12 years ago by angelia
'Append data from multiple worksheet to single worksheet macro
0 1083 posted 12 years ago by angelia
Used to invoke a GetSaveAsFileName dialogue box
0 947 posted 12 years ago by sjmoorecouk
Save the following code as a macro and then apply it to the fields you want to convert
0 1375 posted 13 years ago by kidmizere
Counts numbers and places the result in row 1. To get this populated click an top row (any) cell and click Yes to the following dialogue box. Only uniquely counts number values, not text.
0 863 posted 13 years ago by sjmoorecouk
Awesome shortcut.
0 1064 posted 13 years ago by kidmizere
VBA script to remove all the images present in the active sheet of the Microsoft Excel spreadsheet.
0 1033 posted 13 years ago by mikaelpelle
PROBLEM: How to save Excel range into image file. VBA macro in Excel 2007. SOLUTION: Create an empty chart, paste range image into chart area, and Export as image file. Modify code to suite to your needs.
0 4553 posted 14 years ago by win4me
0 974 posted 14 years ago by Maikel
Use this code to change the default highlight color for a cell in excel 2007. Right click on the sheet name and click view code, Paste this code into the module that comes up.
0 1042 posted 14 years ago by aianrnoens
« Prev 1 2