View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Countif with conditions...

Hi Gordon,

Sheet1:
A B C
Product name Month Quantity sold
screws 1 1
nails 1 2
hammers 1 3
....

Sheet2:
A B C D E F G H I J K L M
Product name 1 2 3 4 5 6 7 8 9 10 11 12
screws *
nails
hammers


Formula in B2 (marked with *):
=SUMPRODUCT(--(OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1)=$A2),--(OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$A:$A)-1)=B$1),OFFSET(Sheet1!$C$2,0,0,COUNTA(Sheet1!$A:$A )-1))

Regards,
Stefi


Drag it to right
€˛Gordon€¯ ezt Ć*rta:

Hi Stefi...

Tried this and it doesn't quite fit. To explain further, In column A random
products are added as text, screws, nails, hammers etc and adjacant to this
in column B is a month value 1-12. I need to know on a rolling basis how many
of each tool were sold on any given month. I have a small seperate table that
lists the tools, and then cells for each month. I normally right endless
=if(and( columns but there must be an easier way?

Any assistance appreciated.

Gordon...

"Stefi" wrote:

Have a look at SUMPRODUCT function!
Regards,
Stefi


€˛Gordon€¯ ezt Ć*rta:

Hi...

I want to count products (screws) sold in Jan on a live rolling table
without creating another table. I want to use countif to work against the
screw value AND a date value simoutaneously. Is this possible?

Thanks

Gordon...