Skip to content

Instantly share code, notes, and snippets.

View huvanile's full-sized avatar

Jeremy Huval huvanile

  • Dallas, TX, USA
View GitHub Profile
@huvanile
huvanile / rsChecks.bas
Created May 7, 2021 14:53
RS Check Macros
Option Explicit
Sub doRSChecks()
Range("k2:k" & lastUsedRow).ClearContents
checkForMissingNumbers
checkForExtraNumbers
checkRIDCategoryCode
checkRIDDotsAndHyphens
MsgBox "Done!"
End Sub
@huvanile
huvanile / LMSMacro.bas
Created February 23, 2022 23:48
LMS Macro
Option Explicit
Dim sourceWS As Worksheet
Dim destWS As Worksheet
Sub factoryForLMS()
If Not doesWSExist("Analysis", ActiveWorkbook.name, False) Then buildAnalysisReport
buildPerPerson
Sheets("Analysis").Activate
End Sub
@huvanile
huvanile / Long drop-down example.bas
Created August 8, 2022 20:23
Example of how to programatically create a long drop-down list in Excel
Sub Macro4()
'longVal is collectively more than 255 characters
Dim longVal As String: longVal = "Lorem,ipsum,dolor,sit,amet,consectetur,adipiscing,elit.,Fusce,dolor,dui,eleifend,in,blandit,ac,,vulputate,ac,purus.,In,sollicitudin,dolor,at,massa,interdum,vulputate.,Etiam,eu,bibendum,elit.,Lorem,ipsum,dolor,sit,amet,consectetur,adipiscing,elit.,Fusce,dolor,dui,eleifend,in,blandit,ac,vulputate,ac,purus."
With ActiveSheet.Range("a1").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=longVal
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""