ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   excel SUM function - can it be limited to whats in parentheses? (https://www.excelbanter.com/excel-discussion-misc-queries/124878-excel-sum-function-can-limited-whats-parentheses.html)

liillith

excel SUM function - can it be limited to whats in parentheses?
 
eIs there a way to limit teh =SUM() excel function to what is in the
parentheses in each given line that is being added up? example:
assorted wraps ($7.50)
cookies (1.00)
sodas (1.35)
Total:
and then having it total just the amounts in the parenteses and disregarding
everything else in the box?

Dave F

excel SUM function - can it be limited to whats in parentheses?
 
Put the dollar values in a separate cell, and then sum those.
--
Brevity is the soul of wit.


"liillith" wrote:

eIs there a way to limit teh =SUM() excel function to what is in the
parentheses in each given line that is being added up? example:
assorted wraps ($7.50)
cookies (1.00)
sodas (1.35)
Total:
and then having it total just the amounts in the parenteses and disregarding
everything else in the box?


Dave Peterson

excel SUM function - can it be limited to whats in parentheses?
 
I agree with what Dave F. wrote--life will be lots easier for lots of things if
you put your data in separate fields.

But this worked ok for me:

=SUMPRODUCT(--SUBSTITUTE(MID(A1:A3,SEARCH("(",A1:A3,1)+1,255),") ",""))
Adjust the range to match your data

liillith wrote:

eIs there a way to limit teh =SUM() excel function to what is in the
parentheses in each given line that is being added up? example:
assorted wraps ($7.50)
cookies (1.00)
sodas (1.35)
Total:
and then having it total just the amounts in the parenteses and disregarding
everything else in the box?


--

Dave Peterson


All times are GMT +1. The time now is 04:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com