#1   Report Post  
Myriam
 
Posts: n/a
Default countif

Once again, I need your help.
I am trying to count items by quantity and by size. I can do it by one not
both.
with the formula
=IF(COUNTIF($O$5:O5,O5)=1,SUMIF($O5:$O$253,O5,$P$5 :$P5:$253).0)

O P Q
Item Qty Size

A 2 1"
B 3 2"
C 2 2"
B 1 2"
etc.

I don't know how to add an AND statement to include column Q (size). i.e.,
look for the item with the same name AND same size THEN count them.

I really appreciate any help you could give me.
Thanks!!



  #2   Report Post  
Max
 
Posts: n/a
Default

Perhaps quite ideal to use a pivot table (PT) for this
(only a few steps to get there)

With the sample table below in O1:Q5

Item Qty Size
A 2 1"
B 3 2"
C 2 2"
B 1 2"

Select any cell within the table

Click Data Pivot table Report
Click Next Next

In Step 3 of the wizard:
Drag and drop Item within the ROW area
Drag and drop Size within the COLUMN area
Drag and drop Qty within the DATA area
(It'll appear as Sum of Qty)

Click Finish

The PT will be created in a new sheet to the left,
with the desired results:

Sum of Qty Size
Item 1" 2" Grand Total
A 2 2
B 4 4
C 2 2
Grand Total 2 6 8

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Myriam" wrote in message
...
Once again, I need your help.
I am trying to count items by quantity and by size. I can do it by one

not
both.
with the formula
=IF(COUNTIF($O$5:O5,O5)=1,SUMIF($O5:$O$253,O5,$P$5 :$P5:$253).0)

O P Q
Item Qty Size

A 2 1"
B 3 2"
C 2 2"
B 1 2"
etc.

I don't know how to add an AND statement to include column Q (size).

i.e.,
look for the item with the same name AND same size THEN count them.

I really appreciate any help you could give me.
Thanks!!





  #3   Report Post  
gazornenplat
 
Posts: n/a
Default


Suggest a helper column of =O1 & Q1 and use that

Or have a look at CSE formulae

Gaz


--
gazornenplat


------------------------------------------------------------------------
gazornenplat's Profile: http://www.excelforum.com/member.php...o&userid=24494
View this thread: http://www.excelforum.com/showthread...hreadid=381080

Reply
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
COUNTIF COMBINATION?? Heather Excel Worksheet Functions 1 April 26th 05 02:44 AM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM
countif, again Liz G Excel Worksheet Functions 2 November 1st 04 11:20 PM


All times are GMT +1. The time now is 11:49 PM.

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

About Us

"It's about Microsoft Excel"