Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / June 2007

Tip: Looking for answers? Try searching our database.

Sumif only numbers formated as currency

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bonita - 08 Jun 2007 19:30 GMT
If a column of data consist of currency, % and unformatted numbers, how do
you total only the data formated as currency?
Signature

Bonita

Dave Peterson - 08 Jun 2007 19:51 GMT
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.

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

Signature

Dave Peterson

Peo Sjoblom - 08 Jun 2007 19:55 GMT
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

Signature

Regards,

Peo Sjoblom

> If a column of data consist of currency, % and unformatted numbers, how do
> you total only the data formated as currency?
Gary''s Student - 08 Jun 2007 20:00 GMT
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
Signature

Gary''s Student - gsnu200727

> If a column of data consist of currency, % and unformatted numbers, how do
> you total only the data formated as currency?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.