Skip to content

Instantly share code, notes, and snippets.

@maximpertsov
Last active May 3, 2023 06:23
Show Gist options
  • Save maximpertsov/95fc713a5da5bec1cdc1 to your computer and use it in GitHub Desktop.
Save maximpertsov/95fc713a5da5bec1cdc1 to your computer and use it in GitHub Desktop.
VBA Array map function
Function Map(F As String, ByVal A As Variant) As Variant
' Map function F across 1-Dimensional Array
Dim i As Long
For i = LBound(A) To UBound(A)
A(i) = Application.Run(F, A(i))
Next i
Map = A
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment