Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default Sumif only numbers formated as currency

If a column of data consist of currency, % and unformatted numbers, how do
you total only the data formated as currency?
--
Bonita
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Sumif only numbers formated as currency

I would insert another column and use it to indicate what's in that other column
in that same row.

I'd use C for currency, % for percent, o for other (or anything you want).

Then you could use:

=sumif(b:b,"c",a:a)

to add all the values in column A that had a C in column B.



Bonita wrote:

If a column of data consist of currency, % and unformatted numbers, how do
you total only the data formated as currency?
--
Bonita


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Sumif only numbers formated as currency

You could use a help column, assume the values are in A1:A10, insert a new
column B and in B1 put

=LEFT(CELL("format",A1))="C"

copy down to B10

now use

=SUMIF(B1:B10,TRUE,A1:A10)

having said that, it is not a good design to use this method, all it takes
is that
someone changes one format by mistake and your totals will be off


--
Regards,

Peo Sjoblom

"Bonita" wrote in message
...
If a column of data consist of currency, % and unformatted numbers, how do
you total only the data formated as currency?
--
Bonita



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Sumif only numbers formated as currency

Try this small UDF:

Function summ(R As Range) As Double
summ = 0
For Each rr In R
tx = rr.Text
If Left(tx, 1) = "$" Then
summ = summ + rr.Value
End If
Next
End Function


if A1 through A6 contained:

1
2
$3.00
4
$5.00
7

then
=summ(a1:a6) will return 8
--
Gary''s Student - gsnu200727


"Bonita" wrote:

If a column of data consist of currency, % and unformatted numbers, how do
you total only the data formated as currency?
--
Bonita

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
Adding numbers to a Time Formated cell Browner Excel Discussion (Misc queries) 2 June 20th 06 03:55 PM
Insert currency numbers from spreadsheet such as 48 = $48.00 Bob Excel Worksheet Functions 5 June 8th 06 06:53 PM
When I type numbers in currency all I get is ####### mommy4shane Excel Discussion (Misc queries) 3 December 3rd 05 07:33 AM
Cells formated as numbers are calculating like text MM_BAM Excel Discussion (Misc queries) 4 July 7th 05 01:29 AM
How do I sum currency only numbers in a range? construction guy Excel Worksheet Functions 2 April 13th 05 07:08 AM


All times are GMT +1. The time now is 06:49 AM.

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

About Us

"It's about Microsoft Excel"