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 3259 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 3235 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 3337 posted 9 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 3395 posted 9 years ago by cueballrawn
Lists all filenames in a directory if you need them for formulae or add into VBA.
1 3288 posted 9 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 7368 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 3319 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 2997 posted 9 years ago by cueballrawn
VBA to unhide all worksheets in an Excel workbook.
0 3095 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 3504 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 3230 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 3276 posted 10 years ago by BDOGG32
Code to turn certain feature off and on for faster running of code in Excel
1 3564 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 1894 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 1878 posted 12 years ago by mprabhuram
short loop to load a dictionary
0 1765 posted 12 years ago by lolrenx
Concatenate all text in cells with defined separator
0 1148 posted 12 years ago by lolrenx
quick way to get column headers formatted
0 1093 posted 12 years ago by lolrenx
consider currentregion as a 'datarange' custom class
1 1896 posted 12 years ago by lolrenx
Copy rows based on criteria to a new sheet or file
0 1356 posted 12 years ago by angelia
'Append data from multiple worksheet to single worksheet macro
0 1195 posted 12 years ago by angelia
Used to invoke a GetSaveAsFileName dialogue box
0 1019 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 1494 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 939 posted 13 years ago by sjmoorecouk
Awesome shortcut.
0 1152 posted 13 years ago by kidmizere
VBA script to remove all the images present in the active sheet of the Microsoft Excel spreadsheet.
0 1135 posted 14 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 4780 posted 14 years ago by win4me
0 1082 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 1167 posted 14 years ago by aianrnoens
« Prev 1 2