Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If you could follow that...
I have a number of columns of information for any given row. I would like to set up a sheet that will sum Column C for all rows IF Column A = {a given value} AND Column D = {a different given value}. I may even need to throw in that Column B = {another given value}. Can I do this and how? I've run across something about VLOOKUP, but I'm not sure how to make that work. I'm primarily a CAD operator making brief forays into Excel, and I keep thinking it has got to be easier than all the manual sorting I'm currently doing. I'm using Excel 2003 (on Windows XP SP2) |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assign your "given values" to particular cells, so they can easily be
changed, without having to revise the formula itself (E1, E2). =Sumproduct((A1:A100=E1)*(D1:D100=E2)*C1:C100) To add other criteria, simply add another argument: =Sumproduct((A1:A100=E1)*(D1:D100=E2)*(B1:B100=E3) *C1:C100) All ranges should be the same size, and you *cannot* use entire columns (A:A - B:B) -- HTH, RD ================================================== === Please keep all correspondence within the Group, so all may benefit! ================================================== === "Minx" wrote in message ... If you could follow that... I have a number of columns of information for any given row. I would like to set up a sheet that will sum Column C for all rows IF Column A = {a given value} AND Column D = {a different given value}. I may even need to throw in that Column B = {another given value}. Can I do this and how? I've run across something about VLOOKUP, but I'm not sure how to make that work. I'm primarily a CAD operator making brief forays into Excel, and I keep thinking it has got to be easier than all the manual sorting I'm currently doing. I'm using Excel 2003 (on Windows XP SP2) |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=SUMPRODUCT((Xewks!A1:A425=A10)*(Xewks!E1:E425=5)* (Xewks!D1:D425="B
Borrow")*Xewks!B1:B425) Here is what I put in for my SUMPRODUCT formula, but it just gives me a #VALUE error. Closer than what I was doing before, but still not working - so I must be misunderstanding something. Thank you for your help! "RagDyeR" wrote: Assign your "given values" to particular cells, so they can easily be changed, without having to revise the formula itself (E1, E2). =Sumproduct((A1:A100=E1)*(D1:D100=E2)*C1:C100) To add other criteria, simply add another argument: =Sumproduct((A1:A100=E1)*(D1:D100=E2)*(B1:B100=E3) *C1:C100) All ranges should be the same size, and you *cannot* use entire columns (A:A - B:B) |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You probably have values in B1 to B425 that are *not* true XL recognized
numbers! Could B1 be a text header? -- Regards, RD ----------------------------------------------------------------------------------------------- Please keep all correspondence within the Group, so all may benefit ! ----------------------------------------------------------------------------------------------- "Minx" wrote in message ... =SUMPRODUCT((Xewks!A1:A425=A10)*(Xewks!E1:E425=5)* (Xewks!D1:D425="B Borrow")*Xewks!B1:B425) Here is what I put in for my SUMPRODUCT formula, but it just gives me a #VALUE error. Closer than what I was doing before, but still not working - so I must be misunderstanding something. Thank you for your help! "RagDyeR" wrote: Assign your "given values" to particular cells, so they can easily be changed, without having to revise the formula itself (E1, E2). =Sumproduct((A1:A100=E1)*(D1:D100=E2)*C1:C100) To add other criteria, simply add another argument: =Sumproduct((A1:A100=E1)*(D1:D100=E2)*(B1:B100=E3) *C1:C100) All ranges should be the same size, and you *cannot* use entire columns (A:A - B:B) |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That was it!
(Actually, everything in Row 1 is a text header) Thank you so much!! "RagDyeR" wrote: You probably have values in B1 to B425 that are *not* true XL recognized numbers! Could B1 be a text header? |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You're welcome, and thank you for the feed-back.
-- Regards, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Minx" wrote in message ... That was it! (Actually, everything in Row 1 is a text header) Thank you so much!! "RagDyeR" wrote: You probably have values in B1 to B425 that are *not* true XL recognized numbers! Could B1 be a text header? |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sorry, I meant cond2 and cond3 are never both true for the same sumcolumnvalue.
Jeff "travcoe21" wrote: Note that in order for this to work the way it's supposed to, cond1 and cond3 must never both be true for the same sumcolumnvalue. Which for my application is always the case. |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Is that a good description?
Yes {SUM(AND(cond1, cond2)*sumcolumnvalue)} AND returns a single result where you need an array of results. It sounds like you want an OR comparison: sum C if A = x *or* D = y. Try one of these: =SUMPRODUCT(--((A1:A10="x")+(D1:D10="y")0),C1:C10) =SUMPRODUCT(SIGN((A1:A10="x")+(D1:D10="y")),C1:C10 ) -- Biff Microsoft Excel MVP "travcoe21" wrote in message ... Sorry, I meant cond2 and cond3 are never both true for the same sumcolumnvalue. Jeff "travcoe21" wrote: Note that in order for this to work the way it's supposed to, cond1 and cond3 must never both be true for the same sumcolumnvalue. Which for my application is always the case. |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to sum a column of both negative and positive numbers on another
worksheet based on two conditions. I have tried to construct an array that would =Sum(if((A2:A278,="2000")*(M2:M278,="0"),M2:M278) ) Should that not sum the column M2:M278 positive integers based on the criteria that all rows in A2:A278 are equal to "2000".??? "Minx" wrote: If you could follow that... I have a number of columns of information for any given row. I would like to set up a sheet that will sum Column C for all rows IF Column A = {a given value} AND Column D = {a different given value}. I may even need to throw in that Column B = {another given value}. Can I do this and how? I've run across something about VLOOKUP, but I'm not sure how to make that work. I'm primarily a CAD operator making brief forays into Excel, and I keep thinking it has got to be easier than all the manual sorting I'm currently doing. I'm using Excel 2003 (on Windows XP SP2) |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
To exclude negative values from the sum...
Works in any "modern" version of Excel: =SUMPRODUCT(--(A2:A278=2000),--(M2:M2780),M2:M278) If you're using Excel 2007: =SUMIFS(M2:M278,A2:A278,2000,M2:M278,"0") -- Biff Microsoft Excel MVP "Terry" wrote in message ... I am trying to sum a column of both negative and positive numbers on another worksheet based on two conditions. I have tried to construct an array that would =Sum(if((A2:A278,="2000")*(M2:M278,="0"),M2:M278) ) Should that not sum the column M2:M278 positive integers based on the criteria that all rows in A2:A278 are equal to "2000".??? "Minx" wrote: If you could follow that... I have a number of columns of information for any given row. I would like to set up a sheet that will sum Column C for all rows IF Column A = {a given value} AND Column D = {a different given value}. I may even need to throw in that Column B = {another given value}. Can I do this and how? I've run across something about VLOOKUP, but I'm not sure how to make that work. I'm primarily a CAD operator making brief forays into Excel, and I keep thinking it has got to be easier than all the manual sorting I'm currently doing. I'm using Excel 2003 (on Windows XP SP2) |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=SUM(IF((A2:A278=2000)*(M2:M278=0),M2:M278))
This is an array formula CTRL + SHIFT + ENTER Gord Dibben MS Excel MVP On Sun, 25 Apr 2010 10:37:01 -0700, Terry wrote: I am trying to sum a column of both negative and positive numbers on another worksheet based on two conditions. I have tried to construct an array that would =Sum(if((A2:A278,="2000")*(M2:M278,="0"),M2:M278) ) Should that not sum the column M2:M278 positive integers based on the criteria that all rows in A2:A278 are equal to "2000".??? "Minx" wrote: If you could follow that... I have a number of columns of information for any given row. I would like to set up a sheet that will sum Column C for all rows IF Column A = {a given value} AND Column D = {a different given value}. I may even need to throw in that Column B = {another given value}. Can I do this and how? I've run across something about VLOOKUP, but I'm not sure how to make that work. I'm primarily a CAD operator making brief forays into Excel, and I keep thinking it has got to be easier than all the manual sorting I'm currently doing. I'm using Excel 2003 (on Windows XP SP2) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I combine spreadsheets and documents in one file? | Excel Discussion (Misc queries) | |||
macro | Excel Discussion (Misc queries) | |||
Column picked randomly with probability relative to number of entr | Excel Worksheet Functions | |||
creating a bar graph | Excel Discussion (Misc queries) | |||
Return Count for LAST NonBlank Cell in each Row | Excel Worksheet Functions |