Ask Experts Questions for FREE Help !
Ask
    speck283's Avatar
    speck283 Posts: 2, Reputation: 1
    New Member
     
    #1

    Feb 19, 2010, 09:25 PM
    excel 2007 count
    Below are the columns of my excel 2007 spreadsheet...

    red blue yellow
    1 2 3
    3 1 5
    2 5 4
    1 2 4

    I am trying to COUNT the number of times a specified values occur in 2 instances...

    1. I am trying to count the number of times the number 2 occurs in the "blue" column as long as the value in the "red" column is number 1 - answer... 2 times

    2. Then I am trying to calculate the number of times the value 3 occurs in the "yellow" column as long as the value in the "blue" column is 2 AND the value in the "red" column is 1 - answer... 1 time

    I have been trying this in either a pivot table or formula but have not had any success - Does anyone know if this can be accomplished in excel 2007 and can give examples of the process? (My preference would be a pivot table as there would be thousands of values).

    Thank you very much for any guidance/assistance you may provide me.
    Steven
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #2

    Feb 19, 2010, 10:11 PM

    I'm not a huge PivotTable user, but I know your problem can be solved simply with a SUMPRODUCT() formula.

    Code:
    	 A	 B	 C	 D	  E	  F	  G	  H
    1	red	blue	yellow		RedVal	BlueVal	Yellow	Count
    2	 1	 2	 3		  1	  2	  3	  1   
    3	 3	 1	 5					
    4	 2	 5	 4					
    5	 1	 2	 4
    The formula in H2 would be:
    =SUMPRODUCT(($A$2:$A$5=E2) * ($B$2:$B$5=F2) * ($C$2:$C$5=G2))

    When you expand the formula for the depth of data, only expand it as far as needed. Resist the urge to use tons more rows or even the whole column.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Excel count function [ 12 Answers ]

I am trying to count a large group of cells that are colored depending on the data. For example: I want to count the number of red cells which are faults. I tried the countif but not sure how to set the criteria. Thanks for any help.

How to count how many of each in excel 2007 [ 1 Answers ]

I need to count how many of each item is contained in a column of data (for instance, 4000 rows of data, 100 different items, but multiples of each item - how many Apples, Oranges, Bananas, etc. of each?). How do I do that in Excel 2007?

Excel 2007 to have excel 2003 look? [ 6 Answers ]

Hey I have Microsoft Excel 2007, from my course at college I have been given instructions to do a task. However these instructions are for excel 2003. How do I change my excel 07 to look like excel 03 so that it is easier. I know there is a way, help greatly appreicated thanks.

How to Count Differences in Excel [ 2 Answers ]

I have to believe this is possible, but I'm stumped. If I have a list: Dog Dog Cat Cat Hamster Dog Cat Bird

Excel Count Function [ 4 Answers ]

In November 2004 Leif 5233 wrote the following regarding counting cells highlighted in a certain colour: ------------------ Create this function: Function CountCol(SumRange As Range, intColor As Integer) As Integer Dim I As Integer Dim Cell As Range Set SumRange =...


View more questions Search