Hey, I was just wondering if anyone could help me with a function that I'm trying to put into a spreadsheet.

This is what I'm trying to do:

I want Column E to add the value from Column C IF column D reads "win" and if column D reads "loss" I want column E to subtract the value from Column A.

Id appreciate if anyone could help me out.

thanks in advance.