Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Countif with conditions...

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...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Countif with conditions...

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...

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Countif with conditions...

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...

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Countif with conditions...

I have posted an example at http://cjoint.com/?icl2ypomXW

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Gordon" wrote in message
...
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...



  #5   Report Post  
Posted to microsoft.public.excel.programming
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...



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Countif with conditions...

Hi Bob...

The example that you kindly provided contained code:

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:H10"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
'do your stuff
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

Since I intergrated this sheet into

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

Was this code relavent to the formula example. Also, since I've added the
example you provided the sheet has stopped auto calculating even though the
option is ticked. Is that issue connected someway to the code above. It's a
bit beyond my level of expertese.

Thanks

Gordon...



"Bob Phillips" wrote:

I have posted an example at http://cjoint.com/?icl2ypomXW

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Gordon" wrote in message
...
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...




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Countif with conditions...

Gordon,

The code is not necessary, it is code that I have in my standard workbook, I
forgot to delete it. There will also be code behind all sheets and
ThisWorkbook. none of which is required, just the formulae.

Get rid of the code and see if it autocalcaulates then, it should do.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Gordon" wrote in message
...
Hi Bob...

The example that you kindly provided contained code:

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:H10"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
'do your stuff
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

Since I intergrated this sheet into

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

Was this code relavent to the formula example. Also, since I've added the
example you provided the sheet has stopped auto calculating even though

the
option is ticked. Is that issue connected someway to the code above. It's

a
bit beyond my level of expertese.

Thanks

Gordon...



"Bob Phillips" wrote:

I have posted an example at http://cjoint.com/?icl2ypomXW

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Gordon" wrote in message
...
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...






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 Conditions - Use of conditions that vary by cell value JonTarg Excel Discussion (Misc queries) 1 May 30th 08 01:21 PM
Countif with two conditions Bob Phillips Excel Discussion (Misc queries) 0 July 3rd 07 09:37 PM
Using CountIf with 2 conditions - help! Sarah Excel Worksheet Functions 6 May 23rd 06 07:18 PM
Countif with conditions Mosqui Excel Worksheet Functions 2 December 5th 05 04:10 AM
COUNTIF 2 conditions Sojo Excel Worksheet Functions 2 June 29th 05 08:37 PM


All times are GMT +1. The time now is 02:27 AM.

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"