ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum of numbers with dependencie on another column (https://www.excelbanter.com/excel-discussion-misc-queries/69678-sum-numbers-dependencie-another-column.html)

shalombi

Sum of numbers with dependencie on another column
 

I wasnt sure exactly how to word this question but i have an excel sheet
with 2 cullumns
|23|34|
|24|56|
|23|34|
|24|56|
|23|34|
|24|56|
|23|34|
|24|56|
|23|34|
|24|56|
|23|34|
|24|56|

now the actual one is more complicated but say i want to sum only the
numbers on the right hand size where the number on the left handsize is
23 how could i do this??
i had trouble searching the forums cause i couldnt really word the
question properly.
Thanks for your help

Max


--
shalombi
------------------------------------------------------------------------
shalombi's Profile: http://www.hightechtalks.com/m899
View this thread: http://www.hightechtalks.com/t2352985


flummi

Sum of numbers with dependencie on another column
 
First set of data in A1:12
Second set of data in B1:B12

In C1 type: =SUMIF(A1:A12,"=23",B1:B12)

Hans


shalombi

Sum of numbers with dependencie on another column
 

thank you, im not used to excel and the syntax is throwing me off a
bit.
Id rather use a good old for with a bit of incrementing and some
sentinel values it just seems all so simplier :)
anyway thanks alot.

Max


--
shalombi
------------------------------------------------------------------------
shalombi's Profile: http://www.hightechtalks.com/m899
View this thread: http://www.hightechtalks.com/t2352985


shalombi

Sum of numbers with dependencie on another column
 

how can i add multiple possibilities ?
i tried separating by commas, or, || and all i knew from programing and
it didnt work.
=SUMIF(E2:E547,"=391",H2:H547)
if i want to have also lets say 58 in their

=SUMIF(E2:E547,"=391,58",H2:H547)
i tried many different things and none worked

Max


--
shalombi
------------------------------------------------------------------------
shalombi's Profile: http://www.hightechtalks.com/m899
View this thread: http://www.hightechtalks.com/t2352985


flummi

Sum of numbers with dependencie on another column
 
Hi,

the comma is a list separator which is a local Windows setting
(regional and language settings). Try replacing it with a semicolon or
lookup your settings in Windows.

For multiple selections I have set up a simple example below:

Data in A2:B10
Selection criteria in E2:I2
Total in D3
Formulas in E3:H3

group numbers total cond1 cond2 cond3 cond4 insert new cols bevor this
green 32 green red yellow magenta no entry
magenta 16 219 32 45 103 39
magenta 23
red 12
red 33
yellow 6
yellow 53
yellow 44
add rows before this

Formula in D3: =SUM($E$3:$I$3)
Formula in E3: =SUMIF($A$2:$A$10;"="&E$2&"";$B$2:$B$10)
Copy formula in E3 to F3:H3

Mind that the ranges are fixed which means that for new rows with data
insert the number of lines required befor the row that reads "add rows
before this". This line is included in the range.
Similarly add columns for additional conditions before the column that
reads "insert new cols before this" because this column is included in
the range. If you insert new conditions don't forget to copy the
formula from the preceding cell into the new ones.

If this still isn't the solution please come back.

Hans


pinmaster

Sum of numbers with dependencie on another column
 
Try this:

=SUM(IF(E2:E547={391,58},H2:H547))
this is an array formula so enter it using CTRL+SHIFT+ENTER

HTH
JG

"shalombi" wrote:


how can i add multiple possibilities ?
i tried separating by commas, or, || and all i knew from programing and
it didnt work.
=SUMIF(E2:E547,"=391",H2:H547)
if i want to have also lets say 58 in their

=SUMIF(E2:E547,"=391,58",H2:H547)
i tried many different things and none worked

Max


--
shalombi
------------------------------------------------------------------------
shalombi's Profile: http://www.hightechtalks.com/m899
View this thread: http://www.hightechtalks.com/t2352985



shalombi

Sum of numbers with dependencie on another column
 

Thank you all very much,

I appreciate the help.
keep up the good work

Max


--
shalombi
------------------------------------------------------------------------
shalombi's Profile: http://www.hightechtalks.com/m899
View this thread: http://www.hightechtalks.com/t2352985


Ragdyer

Sum of numbers with dependencie on another column
 
How about a *non* array formula:

=SUM(SUMIF(E2:E547,{391,58},H2:H547))

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"pinmaster" wrote in message
...
Try this:

=SUM(IF(E2:E547={391,58},H2:H547))
this is an array formula so enter it using CTRL+SHIFT+ENTER

HTH
JG

"shalombi" wrote:


how can i add multiple possibilities ?
i tried separating by commas, or, || and all i knew from programing and
it didnt work.
=SUMIF(E2:E547,"=391",H2:H547)
if i want to have also lets say 58 in their

=SUMIF(E2:E547,"=391,58",H2:H547)
i tried many different things and none worked

Max


--
shalombi
------------------------------------------------------------------------
shalombi's Profile: http://www.hightechtalks.com/m899
View this thread: http://www.hightechtalks.com/t2352985





All times are GMT +1. The time now is 11:21 PM.

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