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 913 posted 6 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 920 posted 7 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 923 posted 7 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 1027 posted 7 years ago by cueballrawn
Lists all filenames in a directory if you need them for formulae or add into VBA.
1 955 posted 7 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 4415 posted 7 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 972 posted 7 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 753 posted 7 years ago by cueballrawn
VBA to unhide all worksheets in an Excel workbook.
0 871 posted 7 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 1098 posted 9 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 864 posted 9 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 941 posted 9 years ago by BDOGG32
Code to turn certain feature off and on for faster running of code in Excel
1 1266 posted 9 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 677 posted 10 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 745 posted 10 years ago by mprabhuram
short loop to load a dictionary
0 600 posted 11 years ago by lolrenx
Concatenate all text in cells with defined separator
0 665 posted 11 years ago by lolrenx
quick way to get column headers formatted
0 594 posted 11 years ago by lolrenx
consider currentregion as a 'datarange' custom class
1 675 posted 11 years ago by lolrenx
Copy rows based on criteria to a new sheet or file
0 780 posted 11 years ago by angelia
'Append data from multiple worksheet to single worksheet macro
0 688 posted 11 years ago by angelia
Used to invoke a GetSaveAsFileName dialogue box
0 520 posted 11 years ago by sjmoorecouk
Save the following code as a macro and then apply it to the fields you want to convert
0 871 posted 12 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 482 posted 12 years ago by sjmoorecouk
Awesome shortcut.
0 625 posted 12 years ago by kidmizere
VBA script to remove all the images present in the active sheet of the Microsoft Excel spreadsheet.
0 600 posted 12 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 3638 posted 12 years ago by win4me
0 575 posted 12 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 626 posted 13 years ago by aianrnoens
« Prev 1 2