I need your help for building analytics in Microsoft Excel using VBA.
I have one data sheet with y columns and n lines
Line Number Firstname Lastname Country Training Hours Training Status
1 John Smith USA 1 Completed
2 Henri Dupont France 1 Completed
3 Paul Walker USA 25 Incomplete
4 Ron Howard USA 10 Completed
And I would like to use array like in php but using VBA
For i = 1 To nblines
If(array[i]["Country"] = "USA" And array[i]["Training Status"] = "Completed") Then
myval = myval + array[i]["Training Hours"]
End If
Next
myval should be 11
Unfortunately I don't find THE solution. I've tried dictionnary, collection and array but without success. Any idea?

SUMIFSformula? Either could address the added information that you gave in Scott Craner's answer. No VBA needed and more flexible.