Subtracting from one value column based on different criteria

Hi,

I have a table that looks like this:

| Name     | company | Month | values |
| Revenues | A       | Jan   | 100    |
| Revenues | A       | Feb   | 200    |
| Revenues | B       | Jan   | 300    |
| Revenues | B       | Feb   | 400    |
| Revenues | C       | Jan   | 500    |
| Revenues | C       | Feb   | 600    |
| Costs    | A       | Jan   | 10     |
| Costs    | A       | Feb   | 20     |
| Costs    | B       | Jan   | 30     |
| Costs    | B       | Feb   | 40     |
| Costs    | C       | Jan   | 50     |
| Costs    | C       | Feb   | 60     |

I now want to calculate reveneus - costs, depending on Month and Company.

So f.e. Revenues from Company A and from Jan - Costs from Company A and from Jan.

Any idea how I could do this?

Thanks in advance