Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
construction guy
 
Posts: n/a
Default How do I sum currency only numbers in a range?

I would like to sum a range of cells, only ignoring non-currency values.
e.g.: 5 10 $4 6 sum = $4
  #2   Report Post  
GaryDK
 
Posts: n/a
Default

Here's one way to do it -

Assume that the values in your example are in cells A1 through A4, and
with the value '4' formatted as currency. Enter the following formula
in, say, cells B1 and copy it down through cell B4:

=CELL("format",A1)

Note the text value that it returns for the currency-formatted cell. In
a sheet I created that value was "C0" (C and zero), but it might be
different depending on the currency format. Now in a different cell
enter the following formula:

=SUMIF(B1:B4,"C0",A1:A4)

and format that cell accordingly. If you use a consistent currency
format, the SUMIF function plus the CELL("format",) function should
work for you.

Gary

  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

I have tried using cell("format") to do things like that and I would not
recommend it,
I would instead urge the OP to use a better layout, do not mix currency with
other numbers
since it is only the display and not the underlying values that are
different

--
Regards,

Peo Sjoblom


"GaryDK" wrote in message
ups.com...
Here's one way to do it -

Assume that the values in your example are in cells A1 through A4, and
with the value '4' formatted as currency. Enter the following formula
in, say, cells B1 and copy it down through cell B4:

=CELL("format",A1)

Note the text value that it returns for the currency-formatted cell. In
a sheet I created that value was "C0" (C and zero), but it might be
different depending on the currency format. Now in a different cell
enter the following formula:

=SUMIF(B1:B4,"C0",A1:A4)

and format that cell accordingly. If you use a consistent currency
format, the SUMIF function plus the CELL("format",) function should
work for you.

Gary



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
Displaying all combinations of a range of numbers Mally Excel Worksheet Functions 5 May 10th 16 07:54 AM
Match Last Occurrence of two numbers and Return Date Sam via OfficeKB.com Excel Worksheet Functions 6 April 5th 05 12:40 PM
How to add one number to a range of numbers BatonRougeguy Excel Worksheet Functions 1 February 16th 05 06:47 AM
How do I add a range of numbers to sum a specific total? SJoshi Excel Worksheet Functions 3 February 15th 05 01:16 PM
Converting negative numbers in a range of cells to zero Dede Excel Discussion (Misc queries) 3 January 14th 05 06:23 PM


All times are GMT +1. The time now is 02:16 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"