Skip to content

Instantly share code, notes, and snippets.

View mattjcamp's full-sized avatar
😍
Analyzing

Matt Campbell mattjcamp

😍
Analyzing
View GitHub Profile
@mattjcamp
mattjcamp / cell-filters.vbs
Last active September 22, 2023 13:52
VBA Change cell filter values and read the result
Sub MakeFiltersActivate()
Dim wb As Workbook
Set wb = Application.Workbooks("WORKBOOK")
Dim ws As Worksheet
Set ws = wb.Worksheets("WORKSHEET")
ws.Cells(1, 2).Value = "Pennsylvania"
Debug.Print ws.Cells(1, 2).Value
Debug.Print ws.Cells(6, 2).Value
@mattjcamp
mattjcamp / import-all-text.vbs
Created March 24, 2015 13:17
VBA Import a tab delimited file forcing numbers to be text
Sub ImportCSV()
Dim myarray() As Variant
MyPath = Application.GetSaveAsFilename()
For i = 0 To 16384
ReDim Preserve myarray(i)
myarray(i) = 2
Next i
@mattjcamp
mattjcamp / Read Excel Workbooks from a Directory.r
Last active September 23, 2023 12:37
R RStudio Read Excel workbooks from a folder
# comment
library(xlsx)
dir <- "//[FILESHARE]/[FOLDER]"
files <- list.files(dir)
listOfStuff <- NULL
for (wb in files) {