Counting sets of cells based on two parameters

Hello,

We have a spreadsheet that is layed out something like this:

6 Collumns. Collumn A contains certain features of a software product.
Collumn C contains X's, as checkmarks (indicating those features are
present). Collumn F contains comments regarding the features in
collumn A.

The table looks something like this:

A           C                        F

feat1       X                      comment
feat2                               comment
feat3       X

What we need to do is count the NUMBER OF ROWS that contain BOTH an X
in collumn C, and a comment in collumn F. I know how to count the
number of Xs and the number of Comments, but I need to be able to
count rows with BOTH. For intance, in my example, the formula would
equal 1, as only the first row has both a comment AND a checkmark.

I've been doing some reading and it seems like the dcounta formula is
what i'm looking for, but I cant seem to make it work.

Any suggestions would be greatly appreciated.

-Bret
0
8/11/2009 7:08:43 PM
excel 39879 articles. 2 followers. Follow

4 Replies
511 Views

Similar Articles

[PageSpeed] 18

Try

=SUMPRODUCT(--(C2:C200-"X"),--(F2:F200="comment"))

-- 
__________________________________
HTH

Bob

"Bret" <bpotter652@gmail.com> wrote in message 
news:06c3d84b-61b7-417f-ade2-966fcb9c4e80@g10g2000yqh.googlegroups.com...
> Hello,
>
> We have a spreadsheet that is layed out something like this:
>
> 6 Collumns. Collumn A contains certain features of a software product.
> Collumn C contains X's, as checkmarks (indicating those features are
> present). Collumn F contains comments regarding the features in
> collumn A.
>
> The table looks something like this:
>
> A           C                        F
>
> feat1       X                      comment
> feat2                               comment
> feat3       X
>
> What we need to do is count the NUMBER OF ROWS that contain BOTH an X
> in collumn C, and a comment in collumn F. I know how to count the
> number of Xs and the number of Comments, but I need to be able to
> count rows with BOTH. For intance, in my example, the formula would
> equal 1, as only the first row has both a comment AND a checkmark.
>
> I've been doing some reading and it seems like the dcounta formula is
> what i'm looking for, but I cant seem to make it work.
>
> Any suggestions would be greatly appreciated.
>
> -Bret 


0
BobNGs (423)
8/11/2009 7:14:16 PM
On Aug 11, 2:14=A0pm, "Bob Phillips" <Bob...@somewhere.com> wrote:
> Try
>
> =3DSUMPRODUCT(--(C2:C200-"X"),--(F2:F200=3D"comment"))
>
> --
> __________________________________
> HTH
>
> Bob
>
> "Bret" <bpotter...@gmail.com> wrote in message
>
> news:06c3d84b-61b7-417f-ade2-966fcb9c4e80@g10g2000yqh.googlegroups.com...
>
>
>
> > Hello,
>
> > We have a spreadsheet that is layed out something like this:
>
> > 6 Collumns. Collumn A contains certain features of a software product.
> > Collumn C contains X's, as checkmarks (indicating those features are
> > present). Collumn F contains comments regarding the features in
> > collumn A.
>
> > The table looks something like this:
>
> > A =A0 =A0 =A0 =A0 =A0 C =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
F
>
> > feat1 =A0 =A0 =A0 X =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0comment
> > feat2 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 comme=
nt
> > feat3 =A0 =A0 =A0 X
>
> > What we need to do is count the NUMBER OF ROWS that contain BOTH an X
> > in collumn C, and a comment in collumn F. I know how to count the
> > number of Xs and the number of Comments, but I need to be able to
> > count rows with BOTH. For intance, in my example, the formula would
> > equal 1, as only the first row has both a comment AND a checkmark.
>
> > I've been doing some reading and it seems like the dcounta formula is
> > what i'm looking for, but I cant seem to make it work.
>
> > Any suggestions would be greatly appreciated.
>
> > -Bret- Hide quoted text -
>
> - Show quoted text -

VERY close. Your formula did work the way I asked for it to work
(there is a typo in it, you put a - instead of =3D, but I fixed it)

That comment field of course does not say "comment", it is actually
where the comments are written, so it will say different things. I
need it to count the rows that have an X as well as anything in that F
collumn. Basically, I'm asking what the wildcard value is to put in
there for anything in that collumn.

A           C                        F

feat1       X                      something
feat2                               something else
feat3       X
feat4       X                      blah

In this example, I want it to return a value of 2.

=3DSUMPRODUCT(--(C2:C200=3D"X"),--(F2:F200=3D"**WHAT GOES HERE**"))
0
8/11/2009 7:53:38 PM
Your second term could be:

--(F2:F200<>"")

Hope this helps.

Pete

On Aug 11, 8:53=A0pm, Bret <bpotter...@gmail.com> wrote:
>
> VERY close. Your formula did work the way I asked for it to work
> (there is a typo in it, you put a - instead of =3D, but I fixed it)
>
> That comment field of course does not say "comment", it is actually
> where the comments are written, so it will say different things. I
> need it to count the rows that have an X as well as anything in that F
> collumn. Basically, I'm asking what the wildcard value is to put in
> there for anything in that collumn.
>
> A =A0 =A0 =A0 =A0 =A0 C =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0F
>
> feat1 =A0 =A0 =A0 X =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0something
> feat2 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 somethi=
ng else
> feat3 =A0 =A0 =A0 X
> feat4 =A0 =A0 =A0 X =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0blah
>
> In this example, I want it to return a value of 2.
>
> =3DSUMPRODUCT(--(C2:C200=3D"X"),--(F2:F200=3D"**WHAT GOES HERE**"))- Hide=
 quoted text -
>
> - Show quoted text -

0
pashurst (2576)
8/11/2009 8:19:20 PM
see your other post

-- 
Biff
Microsoft Excel MVP


"Bret" <bpotter652@gmail.com> wrote in message 
news:06c3d84b-61b7-417f-ade2-966fcb9c4e80@g10g2000yqh.googlegroups.com...
> Hello,
>
> We have a spreadsheet that is layed out something like this:
>
> 6 Collumns. Collumn A contains certain features of a software product.
> Collumn C contains X's, as checkmarks (indicating those features are
> present). Collumn F contains comments regarding the features in
> collumn A.
>
> The table looks something like this:
>
> A           C                        F
>
> feat1       X                      comment
> feat2                               comment
> feat3       X
>
> What we need to do is count the NUMBER OF ROWS that contain BOTH an X
> in collumn C, and a comment in collumn F. I know how to count the
> number of Xs and the number of Comments, but I need to be able to
> count rows with BOTH. For intance, in my example, the formula would
> equal 1, as only the first row has both a comment AND a checkmark.
>
> I've been doing some reading and it seems like the dcounta formula is
> what i'm looking for, but I cant seem to make it work.
>
> Any suggestions would be greatly appreciated.
>
> -Bret 


0
biffinpitt (3172)
8/11/2009 9:52:35 PM
Reply:

Similar Artilces:

Cell formating in Excel?
Is there a way to have a scroll bar in a single cell? No. -- Best Regards, Luke M "pmarina" <pmarina@discussions.microsoft.com> wrote in message news:5D25B665-B7B8-477D-AAF8-80A347FFA0DD@microsoft.com... > Is there a way to have a scroll bar in a single cell? ...

Excel-how (find/replace) for multifmat cells w/o changing fmat
For a client, i need to be able to find and replace words in cells with 2 formats. But when you replace them,it changes the format of the whole cell, and not just what you changed. Is there any way to work around this without changing the format after all of the find and replaces? Saved from a previous post, but this one has some wordwrap problems fixed: I think you'd have to keep track of each character's font attributes. This works very slowly, but works: Option Explicit Option Compare Text Type myCharacter myChar As String myLen As Long myName As String myFo...

Pivot table and counting.
I have a pivot table that gives me the number of rides done by a van. I can have the pivot table return the number of rides, but what I need is the number vans that participated for a certain day. Example, it is possible to have 27 trips done by 18 vans, how can I count the number of vans and not addup the van number? Any help appreciated. Thank you, Joe Hi Joe We need a bit more information on how your source data table is set up. What information do you have in each column? -- Regards Roger Govier sacredarms <sacredarms@discussions.microsoft.com> wrote: > I have a pi...

SQL 2008 Loop through objects and set permissions
Hi I am developing a new SQL 2008 db for a client and they will be using it for basic functions while I continue to develop it. I am using names for the objects that tell me which users / roles are allowed to execute, select, read etc but it can take a lot of time to set the permissions - and it is easy to forget to do it. I would like to create a stored proc which would loop through each set of objects (ie the tables, views and SPs) and set their permissions according to my naming rules (eg SPs with names beginning AP - - grant execute to role1, read to role2). Can anyone get me star...

Set RN = Range(Cells(2, 1), Cells(r, 1)) error
What wrong with this. It create error. How can I improve to get rid the error? Set RN = Range(Cells(2, 1), Cells(r, 1)) Thanks Daniel Hi Daniel, Too much missing information - has r been declared and what data type is it and what value does it have. What property of the range are you trying to store in the variable RN? What type of variable is RN and has it been declared. -- Thanks, Shane Devenshire "Daniel" wrote: > What wrong with this. It create error. How can I improve to get rid the > error? > > Set RN = Range(Cells(2, 1), Cells(r, 1)) > &...

Cycle Counting
Hello, I am looking for ideas on how to cycle count serial number tracked items without increasing workload. Our serialized items are barcoded but the problem is the are situated on the pallet incorrectly and the pallet is placed on a third level of a racking system. If we could just cycle count based on item count and not include the serial number it would make it easy. Is this possible in Great Plains. We are running Great Plains 8.0. Any suggestions are greatly aprreciated. Thank You, Brian Morris Database Administrator ...

Count
Hi, I would like to know how which formula I should use to count some codes & to ignore the duplicated codes, for example in column A: Code 1234 4321 4321 1234 1234 3214 Now, I want Excel to count & the result is 3 which are: 1234-4321-3214 Yes I can use PivotTable, but I would like to use a formula because I have to deal with this every day. I appreciate your support. -- MFS22 COUNTIF will do it. =COUNTIF(Rng,Rng), where the criterion is the same as the range: e.g =COUNTIF(A3:A8,A3:A8) HTH Peter "MFS" wrote: > Hi, > I wo...

change highlight color on active cells
How do I change the active highlight color of an active cell. Louis Only though VBA. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Static OldCell As Range If Not OldCell Is Nothing Then OldCell.Interior.ColorIndex = xlColorIndexNone End If Target.Interior.ColorIndex = 6 'yellow Set OldCell = Target End Sub This is sheet event code. Right-click on the sheet tab and "View Code". Copy and paste into that module. Chip Pearson has a great add-in named Rowliner.xla that will make the highlighting available for all sheets and workbooks. The code above w...

format cells #4
hi. how can i set by default the cell formatting to 'general' or 'number' or even 'text'? i mean i dont want excel to correct let's say: 1.5 to 01.may or 9/12 to 09.dec. is this possible? thanks. (i have some programs which export data to excel and instead of numbers in excel appear dates and i can't set the cell format before the data is exported) -- notrace2004 ------------------------------------------------------------------------ notrace2004's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=34817 View this thread: http://www....

How do I set up a digital signature for my e-mail account?
I would like to know how I set up a digital signature for my e-mails? Do you mean a regular signature ?? Tools/options/signature picker ???? Steve "machen@shaw.ca" wrote: > I would like to know how I set up a digital signature for my e-mails? ...

How do I count the # of times a value reoccurs and plot it over ti
I wish to plot a number of errors made by each users and compare it over time. I have a column of user ID's and a column of dates. I want the chart to count the number of times each user ID appears and plot against it's corresponding date. However, each time I try to do this, the chart appears wrong. Any ideas? In article <9595B2A1-8282-4AB3-8511-A6776E108164@microsoft.com>, Stephen@discussions.microsoft.com says... > I wish to plot a number of errors made by each users and compare it over > time. I have a column of user ID's and a column of dates. I want t...

Setting the title
I am having trouble getting the title to display properly on my application. The application is called Circa and I want the the title to be either: "Circa - No File Open" or "Circa - [FileName]". It is an MDI application and I don't really use the CDocument other than for a couple of basic things. I have overridden the SetTitle method on both my CMainFrame class and on my CDocument class. When we arrive in the CDocument::SetTitle, I just pass up the call to MainFrame and the MainFrame decides what the title should be and does SetWindowText, but something else is ...

Line count
I am working with a program called Dictaphone. We use Word 2007 in this program. The line count on Dictaphone and the line count in Word 2007 are different even though the Dictaphone text is retrieved from Word 2007. Why would they be different? What is the difference between virutal line count and physical line count? ...

Formatting cells in Excel with Ascending/Descending order
I am trying to insert a drop down asceding/descending arrow in the cell of the excel document. When you click on the arrow which is a small box on the right side of the cell, it will organize all figures/data in that column and you can choose between ascending/descending, or how you want to organize it. Thank you -- Andrew ...

Populate Blank Fields with "0" based on checkmark.
I have a form with 20 fields. The user enters data into some but not all of the fields depending on where they collected data. Is it possible to create a checkbox where, after the user enters their data, they click the checkbox, and any of the 20 fields that are blank get populated with a 0? Thanks for the help. Is there any reason you want them to be zero? If they are numeric fields, you can set the default to zero in table design view. There is no need to use a checkbox, you can arrange it so any empty fields are converted to zero when you move to another record or exit th...

count number of characters in rich edit control
How can i count number of characters in rich edit control 2 If u mean controls of type Rich TextBox control, try RichControl1 RC1; CString Mes=RC.GetText(); int n=Mes.GetLength(); "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i count number of characters in rich edit control 2 EM_GETTEXTLENGTHEX, WM_GETTEXTLENGTH, WM_GETTEXT, EM_STREAM* "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i co...

Counting sales
I have two different datasets. Each with a common identifier. I need a formula that will reference the identifiers in both datasets and count the number of sales a particular agent made. Example. look up this identifier in the other dataset and then give me the value that is 2 columns over from the identifier in the second dataset. See if this helps: http://contextures.com/xlFunctions02.html -- Biff Microsoft Excel MVP "Dave" <Dave@discussions.microsoft.com> wrote in message news:E7245B37-033F-400E-9CEE-9822BE7CB0F5@microsoft.com... >I have two...

Counting Cells with Conditional Formatting
Is there a way to look at a row of data that is either highlighted yellow or red and to count only the data that is highlighted yellow and give me that number? None of my data is numerical....just one letter data, i.e.: "S" or "U" I just want to count how many of the cells are highlighted yellow in a specific row, if that makes more sense. Here's a UDF (Put in a Standard module) and use it in cell A1, like =CountByColor(A8:H8,6) << where 6 (at present) = Yellow = change to =CountByColor(A8:H8,3) to get the reds HTH Function CountByColor(InRa...

COUNT ? need formula
Hi, I want to track the results of my teams sales performance. I record if it is a sale, no sale, cancelled etc in column M. I thought I'd be able to use the COUNT function/formula to be able to search for all the SALES in column M and place the result in a cell ( column O )but I can't work it out. Any ideas? Damian Hi! Try this: =COUNTIF(M1:M100,"sale") Biff "Diamond Jones" <kwanzaNOSPAM@optusnet.com.au> wrote in message news:43a0e897$0$17704$afc38c87@news.optusnet.com.au... > Hi, > > I want to track the results of my teams sales perf...

Count Function
I am creating a report for the number of pupils being collected at a certain collection time e.g. 14:00hr and 15:00hrs using the formula =Count([Child Last Name]) in the collection time footer However when i try to count the overall number of pupils in the footer using the same formula, 'Error' appears on screen? Thanks There are potentially a dozen footer sections in a report. Which one is giving you a problem? What is the name of the control? What is the exact formula? -- Duane Hookom Microsoft Access MVP "ELo" wrote: > I am creating a r...

Changed Cell Address
I am using the Sub shown below. Question: How do I determine the address of the changed cell? Private Sub Worksheet_Change(ByVal Target As Range) Dim WatchRange As Range Dim IntersectRange As Range Set WatchRange = Range("E1:E31") Set IntersectRange = Intersect(Target, WatchRange) If IntersectRange Is Nothing Then 'MsgBox "Changes occured outside of range" Else 'MsgBox "You modified the selected range of cells" Application.Run "Test.xls!Time_Stamp" End If End Sub Hi Richard maybe target.address Cheers JulieD "Richard"...

Counting a count
How do I count a count?? This is what im trying to do: I have a database with a table named tblMain and has incorporated everything within that table but contains info from about 8 other tables. I have not doesigned this database and it appears to have a very poor structure...anyway There are three fields involved in this process...'Request' (either 'dispensation', 'waiver' or 'dispensation and waiver'), 'Department' (which consists of 7 other drop down menu options) and 'RequestStatus' which contains the status of each request by another...

Linking errors with MFC Dialog Based application and Crypto++
Hi, For quite long now I've been trying to get the Crypto++ ([url]www.cryptopp.com[/url]) library working with a simple MFC Dialog Based application. The strange thing is that a Win32 console application links and works fine with the same settings :-| Here are the errors I'm getting: > > --------------------Configuration: dialog - Win32 > Debug-------------------- > Linking... > LINK : warning LNK4049: locally defined symbol ""public: __thiscall > std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ)" > imported > LINK : warni...

data validation
I have used MS Excell 97 and would like to define the validation rul over the celles in one column, so that text(or number) value entered i the every next cell to be unique in relation to the all previou completed celles. If somebody knows the decision of the problem -- Message posted from http://www.ExcelForum.com Try Debra Dalgleish's page at: http://www.contextures.com/xlDataVal07.html (Prevent Duplicates) -- Rgds Max xl 97 -- Please respond, in newsgroup xdemechanik <at>yahoo<dot>com --- "doynovam >" <<doynovam.14at0j@excelforum-nospam.com> wr...

unique or distinct count from xml
How to get a unique count from a xml <Orders> <Order ID="1111" Amount="200"></Order> <Order ID= "2222" Amount="10"></Order> <Order ID="3333" Amount="5"></Order> <Order ID="1111" Amount="20"></Order> </Orders> The result should be 3 unique count and the 4 Order Id counts. How can i get using XPathNodeIterator using Compile,Execute with a XPathNavigator thanks you bhu The XPath expression for that is count(Orders/Order[not(@ID=preceding-sibling::Or...