Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Data in Excel
I'm trying to count data based on the value in 2 columns. I'm using the
following formula =COUNTIF(B2:B57,"DLA")--COUNTIF(D2:D57,1) but it is giving me the wrong count. Is there a way I can make this work? Thanks, |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Data in Excel
=sumproduct(--(b2:b57="dla"),--(d2:d57=1))
Adjust the ranges to match--but you can't use whole columns. =sumproduct() likes to work with numbers. The -- stuff changes trues and falses to 1's and 0's. Bob Phillips explains =sumproduct() in much more detail he http://www.xldynamic.com/source/xld.SUMPRODUCT.html And J.E. McGimpsey has some notes at: http://mcgimpsey.com/excel/formulae/doubleneg.html Marilyn wrote: I'm trying to count data based on the value in 2 columns. I'm using the following formula =COUNTIF(B2:B57,"DLA")--COUNTIF(D2:D57,1) but it is giving me the wrong count. Is there a way I can make this work? Thanks, -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Data in Excel
Hi!
Try this: =SUMPRODUCT(--(B2:B57="DLA"),--(D2:D57=1)) Better to use cells to hold the criteria: A1 = DLA A2 = 1 =SUMPRODUCT(--(B2:B57=A1),--(D2:D57=A2)) Biff "Marilyn" wrote in message ... I'm trying to count data based on the value in 2 columns. I'm using the following formula =COUNTIF(B2:B57,"DLA")--COUNTIF(D2:D57,1) but it is giving me the wrong count. Is there a way I can make this work? Thanks, |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counting Data in Excel
SumProduct works great!!
Thank you ALL!! "Marilyn" wrote: I'm trying to count data based on the value in 2 columns. I'm using the following formula =COUNTIF(B2:B57,"DLA")--COUNTIF(D2:D57,1) but it is giving me the wrong count. Is there a way I can make this work? Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sorting 2 colums of numbers and incremening them down | Excel Discussion (Misc queries) | |||
Inputting data to one worksheet for it effect another | Excel Discussion (Misc queries) | |||
Extract MS Excel Data embedded in MS Word | Excel Discussion (Misc queries) | |||
Can't get data from a web page to chart in excel. Any solutions? | Charts and Charting in Excel | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions |