I'm trying to make an array where customers in column A and their amount spent in column B. I have to set up using an array, where I look for customers who spent over $500 then place those customers name and amounts in columns D and E respectively.

I'm can get the code to look at the customer and place them in column D but I can't get the amount to work.

Dim counter As Integer
Dim customers() As String
Dim hiSpent() As String
Dim icustomers As Integer
Dim nCustomers As Integer
Dim iSpent As Integer
    
 ' Clear old results.
    With Range("D3")
        Range(.Offset(1, 0), .Offset(0, 1).End(xlDown)).ClearContents
    End With
    
counter = 0
With Range("A3")
    nCustomers = Range(.Offset(1, 0), .End(xlDown)).Rows.Count
    ReDim customers(nCustomers)
    For icustomers = 1 To nCustomers
            customers(icustomers) = .Offset(icustomers, 0).Value
    Next
End With
     
    ' Put results in columns D and E
    With Range("D3")
        For icustomers = 1 To nCustomers
            .Offset(icustomers, 0) = customers(icustomers)
       Next
    End With
End Sub