Answers for "array in function vba"

VBA
1

vba code to use array formula

Range("A1").FormulaArray = "=INDEX(subset!R1C1:R2472C10,MATCH(1,(RC1=subset!C1)(RC2=subset!C2)(RC5=subset!C5)*(RC6=subset!C6),0),10)"
Posted by: Guest on September-21-2020
0

vba function array parameter

' Sample function with array parameter
Function processArr(Arr() As Variant) As String
    Dim N As Variant  
    dim finalStr as string      
    For N = LBound(Arr) To UBound(Arr)
        finalStr = finalStr & Arr(N)
    Next N
    processArr = finalStr
End Function
' ---------------------------------------------------------------
Sub TestMe()
    Dim fString As String
    Dim arr() As Variant
    arr = Array("foo", "bar")
    fString = processArr(arr)
End Sub
Posted by: Guest on January-30-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language