I have the following data set:

Parent Subsidiary Variable Value
US UK revenue 10
US FRA revenue 15
. . . .
. . . . .
US ESP profit 5
US UK profit 2
. . . .
. . . .
FRA US revenue 20
FRA UK revenue 15
. . . .
. . . .
FRA ESP profit 2
FRA LUX profit 10

I want to calculate the share of revenue that US parent companies have in the UK, FRA, and other countries. The figure for the UK then would be 10/(10+15+...). I want to do likewise for profits (and other variables).
I also want to do this for all countries - ie the share of French parent companies´ revenues that is generated in Spain, Luxembourg and other countries.
I´m guessing I might have to do loops, which I´m not really familiar with.