sum currency values based on format

HYSEN

New Member
Joined
Apr 26, 2004
Messages
19
Office Version
  1. 365
I am trying to sum values (by currency format) from a column of values.
They are all just typed in values, and the currency symbol is set using Format Cells.
So the currency symbol showing is because the cell has been formatted using Format Cells-Number-Currency.

Is there a way of doing this without VBA?
Thanks in advance

$1,000
£1,000
£1,000
$500
etc..
etc..

So from the above, my output should be
$1,500
£2,000
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
You will probably need to create a helper column

In my example, currency data is in a1:a10

Put this in cell b1

=CELL("format",a1)
and copy it down to the last row of data b10

You will notice that USdollars = C2 and All Others = ,2

Then this formula will work

=SUMPRODUCT((a1:a10)*((b1:b10)="C2")) to find USdollars
=SUMPRODUCT((a1:a10)*((b1:b10)=",2")) to find other currencies. Doesn't look like any other currencies have thier own codes.
 
Upvote 0
Another more obscure solution uses a helper cell with an old Excel XLM function called GET.CELL that Bill Jelen talks about in his "Excel Gurus Gone Wild" book. To use this function, use the Define Name (Excel 2003) or Name Manager (Excel 2007) to define a new range. I called mine CELLFORMAT. In the Refers to block, type =GET.CELL(53,Sheet1!A1). The 53 is the option displays a cell as text, including any symbols associated with formatting. Assuming the amounts in your data start in Cell A1, type =left(CELLFORMAT,1) in Cell B1 and copy down. The result will be either the $ for US dollars or the £ for pounds.

Use =sumif(b1:b4,"$",a1:a4) for the total dollars
Use =sumif(b1:b4,"£",a1:a4) for the total pounds
 
Upvote 0
Thanks All. I used Mike version as I need to apply this for multiple currencies. Cheers.
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,183
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top