Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Summing based on currency format of Cell

Hi All

A fairly simple request i think, but I just can't seem to figure it
out, is it possible to sum a cell based on the format of it. I have a
sheet with AUD, EUR, JPY and SGD as the currency formats, and I want
to be able to sum by each currency.

The currency isn't actually written in the cell as it's just the
format, so i cannot use "SUMIF", one solution is to insert an extra
column and put the currency in each row and then use "SUMIF", but I
wondered if there was an easier way?

thanks for anyhelp you can offer!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Summing based on currency format of Cell

First enter this tiny UDF:

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

This returns the visible cell as a text string.

In A1 thru A10 we have:

1
2
3
4
$5.00
6
7
$8.00
9
10

In B1, enter:
=txet(A1) and copy down to see:

1 1
2 2
3 3
4 4
$5.00 $
6 6
7 7
$8.00 $
9 9
10 1

In column B the $'s are REAL. Finally, elsewhe

=SUMPRODUCT(A1:A10,--(B1:B10="$")) which displays 13
--
Gary''s Student - gsnu2007i


"Stav19" wrote:

Hi All

A fairly simple request i think, but I just can't seem to figure it
out, is it possible to sum a cell based on the format of it. I have a
sheet with AUD, EUR, JPY and SGD as the currency formats, and I want
to be able to sum by each currency.

The currency isn't actually written in the cell as it's just the
format, so i cannot use "SUMIF", one solution is to insert an extra
column and put the currency in each row and then use "SUMIF", but I
wondered if there was an easier way?

thanks for anyhelp you can offer!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Summing based on currency format of Cell

thanks for that, I will try that!

On May 30, 7:01*pm, Gary''s Student
wrote:
First enter this tiny UDF:

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

This returns the visible cell as a text string.

In A1 thru A10 we have:

1
2
3
4
$5.00
6
7
$8.00
9
10

In B1, enter:
=txet(A1) and copy down to see:

1 * * * 1
2 * * * 2
3 * * * 3
4 * * * 4
$5.00 * $
6 * * * 6
7 * * * 7
$8.00 * $
9 * * * 9
10 * * *1

In column B the $'s are REAL. *Finally, elsewhe

=SUMPRODUCT(A1:A10,--(B1:B10="$")) which displays 13
--
Gary''s Student - gsnu2007i



"Stav19" wrote:
Hi All


A fairly simple request i think, but I just can't seem to figure it
out, is it possible to sum a cell based on the format of it. *I have a
sheet with AUD, EUR, JPY and SGD as the currency formats, and I want
to be able to sum by each currency.


The currency isn't actually written in the cell as it's just the
format, so i cannot use "SUMIF", one solution is to insert an extra
column and put the currency in each row and then use "SUMIF", but I
wondered if there was an easier way?


thanks for anyhelp you can offer!- Hide quoted text -


- Show quoted text -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add new currency Symbol in Format/Cell/Currency NOORZAD Excel Discussion (Misc queries) 2 June 22nd 09 07:59 AM
Change Currency Format of Cell based on another Cell Simon Excel Worksheet Functions 2 September 2nd 07 04:53 PM
If statement based on currency format juliejg1 Excel Worksheet Functions 4 September 19th 06 03:40 PM
SAP BW Report - Putting the Unit of Measure or Currency in another Cell based on Format Cell Frank & Pam Hayes[_2_] Excel Programming 1 December 3rd 05 05:38 PM
Macro to update based on format? (Currency) Cindy Excel Programming 2 December 2nd 04 10:54 PM


All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"