Hello, I am working on this code that matches multiple criteria and then does a bunch of copy pasting (simply put)
I am looping through my array, sending through the criteria to the UDF, which loops through the second data region to find the match and paste the values I want pasted
simple enough in theory... but when I try and send the criteria through for referencing ... I get an error...
Here is my basic code (haven't finished obviously)
Function code
Error
Not sure why the "=" is required?
TIA
I am looping through my array, sending through the criteria to the UDF, which loops through the second data region to find the match and paste the values I want pasted
simple enough in theory... but when I try and send the criteria through for referencing ... I get an error...
Here is my basic code (haven't finished obviously)
VBA Code:
Sub connect()
Dim hdfcwb As Workbook: Set hdfcwb = Workbooks.Item("Payment Control - HDFC Leg.xlsm")
Dim hdfc As Worksheet: Set hdfc = hdfcwb.Worksheets(1)
Dim a(2 To hdfc.Rows.Count, 1 To 6) As Integer
For r = 2 To UBound(a, 1)
match(a(r, 3), a(r, 4), a(r, 6))
Next r
End Sub
Function code
VBA Code:
Function match(buyer As Long, sponsor As Long, pay As Integer)
End Function
Error
Not sure why the "=" is required?
TIA