Instantly share code, notes, and snippets.

💭
🏫🎓On that college grind

# Sean Bloniensblonien

• Sort options
Last active Aug 10, 2018
Excel VBA Calculate/Update/Evaluate Selection/Selected Cells/Selected Range
View CalculateSelection.bas
 ' These macros are meant to be used with Manual Calculation to just ' calculate the selected cells. The verbose macro shows the ' progress of the calculation by showing what current cell is ' calculating out of the total number of cells. The verbose macro also ' displays how long the macro took to finish. Option Explicit ' ---------------------------------------------------------------- ' Procedure Name: CalculateSelection
Created Aug 10, 2018
Excel VBA Check/Determine if Sheet/Tab/Worksheet Exists
View SheetExists.bas
 ' ---------------------------------------------------------------- ' Procedure Name: SheetExists ' Purpose: Determine whether or not a sheet/tab exists ' Procedure Kind: Function ' Procedure Access: Public ' Return Type: Boolean ' Author: sb172a ' Date: 8/10/2018 ' ---------------------------------------------------------------- Function SheetExists(SheetName As String, Optional GivenWorkbook As Workbook) As Boolean
Created Aug 10, 2018
Excel VBA Remove Special Characters and Spaces/Alpha Numeric Only/Letters Numbers Only
View AlphaNumericOnly.bas
 ' ---------------------------------------------------------------- ' Procedure Name: AlphaNumericOnly ' Purpose: Removes non-alpha numeric characters from the given string ' Procedure Kind: Function ' Procedure Access: Public ' Parameter SourceString (String): the string to remove non alpha numeric values from ' Return Type: String ' Author: sb172a ' Date: 8/9/2018 ' ----------------------------------------------------------------
Created Jul 25, 2018
Excel VBA Get Tab/Sheet/Worksheet Name for calling Function/Formula
View TabName.bas
 ' ---------------------------------------------------------------- ' Procedure Name: TabName ' Purpose: Returns the current sheet/tab name ' Procedure Kind: Function ' Procedure Access: Public ' Author: sb172a ' Date: 7/3/2018 ' ---------------------------------------------------------------- Function TabName() TabName = Application.Caller.Worksheet.Name
Last active Jul 12, 2018
Excel VBA Convert Text/Range/Selection/Column To Numbers/Number Values
View TextToNumber.bas
 ' When comparing these methods, a few tests were done to test their efficiency... ' Test 1: one column, 100,000 total text numbers in the column ' SelectionToNumberInPlace Time: 2.122 seconds ' SelectionToNumberColumn Time: 4.124 seconds ' Test 2: one column, 1,048,576 total text numbers in the column ' SelectionToNumberInPlace Time: 18.1218 seconds ' SelectionToNumberColumn Time: 15.1213 seconds ' Test 3: two columns, 2,097,152 total text numbers in the columns ' SelectionToNumberInPlace Time: 24.1224 seconds ' SelectionToNumberColumn Time: 31.1231 seconds
Created Jul 11, 2018
Excel VBA Remove Print Preview Lines/Page Break Lines/Dotted Lines for Workbook/All Sheets
View RemovePrintLines.bas
 ' ---------------------------------------------------------------- ' Procedure Name: RemovePrintLines ' Purpose: Remove all dotted/dashed print lines in the workbook ' Procedure Kind: Sub ' Procedure Access: Public ' Author: sb172a ' Date: 7/3/2018 ' ---------------------------------------------------------------- Sub RemovePrintLines() Application.ScreenUpdating = False
Created Jul 11, 2018
Excel VBA Toggle/Show/Hide the Visibility of the Gridlines for Workbook/All Sheets
View ToggleGridlines.bas
 ' ---------------------------------------------------------------- ' Procedure Name: ToggleGridlines ' Purpose: Toggle the gridlines for all the sheets in the workbook ' Procedure Kind: Sub ' Procedure Access: Public ' Author: sb172a ' Date: 7/9/2018 ' ---------------------------------------------------------------- Sub ToggleGridlines() Application.ScreenUpdating = False
Last active Jul 11, 2018
Excel VBA Toggle/Show/Hide the Visibility of the Row/Column/Cell Headings for Workbook/All Sheets