I have an excel workbook which requires me to calculate the sum of different currencies on the same column, here is the result I'm looking for:

The `$40.00`

in `Dollars`

was calculated based on item A and C since their currency are the same, while `$20.00`

in `Yen`

is the total for items that has the currency of `Yen`

. Is this possible? Please help, thanks!