View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MarcD MarcD is offline
external usenet poster
 
Posts: 4
Default Sumif on Currency format

Hi Gary''s Student,

Thanks for your response. I'll see how I can work with this UDF (have not
done it before). But I'll manage it.

Best regards,
Marc

"Gary''s Student" wrote:

Let's say we have the following in column A:

ツ」49.98
ぎ 29.16
ツ」49.98
ぎ 29.16
ツ」49.98
ぎ 29.16

First enter this small UDF:

Function txet(r As Range) As String
txet = r.Text
End Function

This function returns a real text string for its argument. In B1 enter:
=txet(A1) and copy down. We se:

ツ」49.98 ツ」49.98
ぎ 29.16 ぎ 29.16
ツ」49.98 ツ」49.98
ぎ 29.16 ぎ 29.16
ツ」49.98 ツ」49.98
ぎ 29.16 ぎ 29.16

Column B ;ooks link column A, but the currency symbols are "real"; therefore
we can use sumproduct:

=SUMPRODUCT((A1:A6),--(LEFT((B1:B6),1)="ツ」"))

which displays:

149.94

--
Gary''s Student - gsnu200742


"MarcD" wrote:

Hi,

I'm travelling for business throughout Europe.
I've setup my expense claim in Excel in both Euro and GBP format on claims
here and there.
Would anybody know of a trick to do a SUMIF based on the currency format
used, in order to get the total amounts in GBP and the total amount in Euro
(each in it's own cell)?

Thanks in advance for your help!

Marc