LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier
 
Posts: n/a
Default Countif on two columns in a sheet

Hi

I think Bob had a small typo in his formula, which would have returned 0 for
the first cell. It followed from the formula you posted, where you were
looking at a data range from row 2, but were comparing against the header
values in row 1, not data values in row 2.

With the formula in say E1, it should be
=SUMPRODUCT(--($C$1:$C$12336=C1),--($D$1:$D$12336=D1))

When then copied down column E, then the amended formula from Bob will
return your results, but maybe not quite in a form you would like to see.

Perhaps if you were to enter in cells H1:J1, Bob, Jaydubs, John and in cells
G2:G4 you entered Flow 1, Flow 2, Flow 3 then the formula below entered in H2
=SUMPRODUCT(--($C$1:$C$12336=H$1),--($D$1:$D$12336=$G2))
and copied across thro' cells I2:J2, and H2:J2 copied down thro' H3:H4 will
produce a matrix of desired results.

Alternatively, your data is highly suitable for analysis with a Pivot Table
Mark the range of your data.
DataPivot TableNextLayout
Drag the Solved by field to the Column area
Drag the Flow field to the Row area
Drag the Solved field also to the Data area, double click the field and
ensure it is set to Count.
Press Finish

For more help on Pivot Tables see
http://peltiertech.com/Excel/Pivots/pivotstart.htm
and
http://www.contextures.com/xlPivot02.html


Regards

Roger Govier


Jaydubs wrote:
Dear Bob Phillips,

Forgive me if I am wrong but the below would take the number of times a
certain values is found in column C and add that to a number of a certain
value found in D. And this is not what I am looking for.

Maybe simplyfying might help.

A B C D
01-11-2005 1 Jaydubs Flow 1
01-11-2005 2 Bob Flow 2
01-11-2005 3 Bob Flow 1
01-11-2005 4 jaydubs Flow 3
02-11-2005 5 John Flow 2
02-11-2005 6 John Flow 1
02-11-2005 7 Bob Flow 1
02-11-2005 8 Bob Flow 1

What I am looking for is a formula which would give me the numbers as follows:

Flow 1 Bob 3 (times)
Flow 1 Jaydubs 1 (times)
Flow 1 John 1 (times)
Flow 2 Bob 1 (times)
Flow 2 John 1 (times)
Flow 3 Jaydubs 1 (times)

Unfortunately your formula does not seem to help me. Sorry !!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hiding columns, error message says cannot shift objects off sheet JORGE ORTIZ Excel Discussion (Misc queries) 11 August 19th 08 10:34 AM
Using CountIf with criteria on another sheet Lee Hunter Excel Worksheet Functions 6 November 3rd 05 03:21 PM
Countif in two columns and in different cells ferde Excel Discussion (Misc queries) 2 October 7th 05 08:31 PM
how do I create more than 266 columns in an excel sheet? Tolo Excel Discussion (Misc queries) 3 September 23rd 05 06:55 PM
Columns in excel sheet Waseem Setting up and Configuration of Excel 1 December 27th 04 06:06 PM


All times are GMT +1. The time now is 07:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"