Hey all!

I am trying to make a query type application in Excel. Access would be better or an integration of the two but for now it needs to be Excel.

I need to loop through all the rows in a worksheet with this condition:

If COLUMN A = "X" then IF COLUMN B = "Y" then ADD what's in COLUMN C

Example:

###A###|###B###|###C###
RED     YES      10
RED     YES      20
RED     NO       90
BLUE    NO       89 
RED     NO       76

IF A="RED" AND B="YES"

TOTAL=30
I though VLOOKUP but then realized that won't work because it's only the first value it finds. I tried INDEX but couldn't get it to work.

I just need some guidelines. Not look for the code.

Thanks!