Last active
May 3, 2023 06:23
-
-
Save maximpertsov/95fc713a5da5bec1cdc1 to your computer and use it in GitHub Desktop.
VBA Array map function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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