'What will be the formula to check which currency a cell contains?

How to check if a cell in google sheet contains $ (USD dollar) currency or Rs. (Pakistani Rupees) currency to calculate two different currencies total?

enter image description here



Solution 1:[1]

Use the following formula in G2:

=ARRAYFORMULA(if(not(ISBLANK(F2:F)), sumif(LEFT(TO_TEXT(B2:B),1),F2:F,B2:B),))

Screenshot

Here is the sample file: https://docs.google.com/spreadsheets/d/1YZmXT9zCXogDLKE400IwqvdeBfdMCJKuouXY8hATp-w/edit?usp=sharing

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David Leal