Count a value if next to another value...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm entering data in a chart, and want to pull stats off that chart. Most
entries are text, but two columns contain types and codes. Lets say the set
of types is A,B,C, etc.., and the set of codes is 1,2,3, etc... I want to
count to get percentages of rows containing type A that are code 1 over all
rows containing type A; rows containing type A that are code 2 over all rows
containing type A, etc. for type B and C; also rows containing code 1 over
all rows, etc. for code 2, code 3; Little help?
 
Without completely understanding your requirement, let me make this
suggestion: for Type A, set up a new column outside the print area. Let's
say that Type A is column D on the sheet and the new column is G. In the
first cell of G after the heading (G2), enter this formula: =IF(D2=1,1,0).
Drag the formula down the column. With the sum function, you can add all the
1s and 0s the formula will produce, and this will tell you the number of A's
that are coded 1. You can use the Count function to determine the number of
entries. Repeat the exercise for B and C, and for types 2 and 3. You can
then calculate the percentages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top