Good day. I am venturing out into using arrays. I have searched the net and have been able to make an array work in a spreadsheet. The formula is shown below in the FormulaArray statement.

Now I need to code in VBA and use variable. The code below is a part of what I have so far. My need is to check for plt in column A and aud_date in Column B. If found in the same row, exit out as the information already exists. If both are not found on the same row, then execute to add the information. I have the code running that allows the entry of the information but have not included here. The MsgBox statements are just for my own checking and will be removed when I have the code working.

I assigned a variable is_done so that if the 2 pieces of information exist on the same row, you get true and exit, otherwise execute the entry code. Maybe I do not even need to do so. Thoughts?

Is If...Then...Else the best method?


 Dim WBSrc As Workbook
 Dim WBDest As Workbook
 Dim is_done As Variant    'Variable to check if information is previously entered
 
 
    
plt = WBSrc.Sheets("Sheet1").Range("C1")
Aud_Date = WBSrc.Sheets("Sheet1").Range("C3")

     MsgBox "Plant is " & plt
     MsgBox "Date is " & Aud_Date
     
     WBDest.Activate
     Sheets("Info").Select
     Range("Z2").Select

'  Check if audit has been entered previously

FormulaArray = "(MATCH(1,(A1: A100000 = & plt) * (B1:B10000 = & Aud_Date),0)"

Thanks in advance.