CURRENCY ADDITION

M

Mohamed

hI,
i have a colomn with three different currencies, (USD, GBP, EURO) , how can
i sum up numbers in dollars only.

Thanks
 
B

Bob Phillips

If the currency is in a separate column, you could use SUMIF, such as

=SUMIF(A1:A20,"USD",B1:B20)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
F

Frank Kabel

Hi
do you want to add only the dollar amounts?. If yes try:
=SUMIF(B1:B100,"USD",A1:A100)
where column B stores the currency string and column A the value

If you want to add all numbers but convert them first to dollar amounts post
baack
 
A

Art

Assume your USD are in cells A3:A10
Your GBP are in B3:B20
Your EURO are in C3:C15

Your conversion from GBP to USD is in B1
Your conversion from EURO to USD is in C1

Then try:
=sum(A3:A10,B3:B20*B1,C3:C15*C1)
After entering the formula, hit ctrl-shift-enter instead of just enter.

Art
 
M

Mohamed

OKAY, but if i have all the currencies in one coloumn, how can i sum up the
dollars only?
 
F

Frank Kabel

Hi
and how do you distinguish the different currencies?
Maybe post some example data to clarify this issue
 
D

Don Guillett

try this idea depending on your formatting.

Sub sumdollars()
For Each c In Selection
If c.NumberFormat = "$#,##0.00" Then mysum = mysum + c
'or
'If c.Style = "Currency" Then mysum = mysum + c
Next
MsgBox mysum
End Sub
 
M

Mohamed

Thanks guys for your answers but still i want to tell you that the currencies
are in one column not 2 and they are in the currency format, example:
Cell A1= $1
Cell A2= $2
Cell A3= 5 Euro

so i want the total of A1 & A2
 
F

Frank Kabel

Hi
then you have to look at Don's VBA based solution.
Though you really may consider splitting the information in two columns (one
for the value and one for the currency)
 
Top