View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
scmopar scmopar is offline
external usenet poster
 
Posts: 3
Default how do I count rows with text values in several columns.

Thanks a lot Roger, it worked.

Why the -- in the formula?


"Roger Govier" wrote:

Hi

One way
=SUMPRODUCT(--($A$1:$A$100="Bob"),--($B$1:$B$100="Small"))

Better still
Enter Small, Medium and Large in cells F1:H1
Enter Bob etc. in cells E2 downward
in cell F2
=SUMPRODUCT(--($A$1:$A$100=$E2),--($B$1:$B$100=F$1))
Copy across and down as required

Or, create a Pivot Table
Assuming A1 contains Platform and B1 contains Size
Place cursor in A1
DataPivot TableFinish
On the PT skeleton that occurs on the newly inserted sheet
Drag Platform to the Row area
Drag Size to the Column area
Drag Platform again, to the Data area where it will become Count of
Platform.
--
Regards
Roger Govier

"scmopar" wrote in message
...
I need your help.

I have to group my answer by Platform and Size.

Column 1 has several platform names ie. "bob". It contains duplicates.

Column 2 contains text values such as small, meduim, large.

My answer needs to be

Bob Small = 1
Bob Medium = 20
Bob Large = 36.

I can use cell text for the platform names and the sizes.

This result will be used in a further financial calculation.

I have tried Sumproduct and CountIf and am lost.

Bob