Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Malcolm Gordon
 
Posts: n/a
Default COUNTIF function query for multiple colums

How do I count the number of occurrences of "1" in the A column each time
there is a negative value in the J column on the same row.

i.e. if cell A1 has a value of 1 and cell J1 has a value of -5 I want this
cell to be counted.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Alan
 
Posts: n/a
Default COUNTIF function query for multiple colums

Try
=SUMPRODUCT(--(A1:A20=1),--(J1:J20<0))
Regards,
Alan.
"Malcolm Gordon" <Malcolm wrote in message
...
How do I count the number of occurrences of "1" in the A column each time
there is a negative value in the J column on the same row.

i.e. if cell A1 has a value of 1 and cell J1 has a value of -5 I want this
cell to be counted.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Malcolm Gordon
 
Posts: n/a
Default COUNTIF function query for multiple colums

Hi Alan,

Thanks for the response. Unfortunately, it didn't work. I should add that
the value s in Column J are based on formulas, does this present a problem?

"Alan" wrote:

Try
=SUMPRODUCT(--(A1:A20=1),--(J1:J20<0))
Regards,
Alan.
"Malcolm Gordon" <Malcolm wrote in message
...
How do I count the number of occurrences of "1" in the A column each time
there is a negative value in the J column on the same row.

i.e. if cell A1 has a value of 1 and cell J1 has a value of -5 I want this
cell to be counted.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Malcolm Gordon
 
Posts: n/a
Default COUNTIF function query for multiple colums

Hi Alan,

I changed the ordering and your formula works! Thanks you very much :-)

"Malcolm Gordon" wrote:

Hi Alan,

Thanks for the response. Unfortunately, it didn't work. I should add that
the value s in Column J are based on formulas, does this present a problem?

"Alan" wrote:

Try
=SUMPRODUCT(--(A1:A20=1),--(J1:J20<0))
Regards,
Alan.
"Malcolm Gordon" <Malcolm wrote in message
...
How do I count the number of occurrences of "1" in the A column each time
there is a negative value in the J column on the same row.

i.e. if cell A1 has a value of 1 and cell J1 has a value of -5 I want this
cell to be counted.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Alan
 
Posts: n/a
Default COUNTIF function query for multiple colums

Hi Malcolm,
Glad it works for you, but it shouldn't make any difference whether the
value in a cell is a number you've entered or the result of a formula, it's
either a negative value or it isn't.
I'm not sure what you mean by 'changing the ordering' though!
Regards,
Alan.
"Malcolm Gordon" wrote in message
...
Hi Alan,

I changed the ordering and your formula works! Thanks you very much :-)

"Malcolm Gordon" wrote:

Hi Alan,

Thanks for the response. Unfortunately, it didn't work. I should add that
the value s in Column J are based on formulas, does this present a
problem?

"Alan" wrote:

Try
=SUMPRODUCT(--(A1:A20=1),--(J1:J20<0))
Regards,
Alan.
"Malcolm Gordon" <Malcolm wrote in
message
...
How do I count the number of occurrences of "1" in the A column each
time
there is a negative value in the J column on the same row.

i.e. if cell A1 has a value of 1 and cell J1 has a value of -5 I want
this
cell to be counted.







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default COUNTIF function query for multiple colums

Hi,

Try the following array formula (Ctrl+Shift+Enter)

SUM(IF((A3:A7=1)*(J3:J7<0),1,0))

Regards,

"Malcolm Gordon" wrote:

How do I count the number of occurrences of "1" in the A column each time
there is a negative value in the J column on the same row.

i.e. if cell A1 has a value of 1 and cell J1 has a value of -5 I want this
cell to be counted.

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 Function On Linked Spreadsheet Josh in Indy Excel Discussion (Misc queries) 0 April 5th 06 05:09 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
"Average" function query Robin Blackwell Excel Worksheet Functions 3 October 3rd 05 09:22 PM
How do you ignore hidden rows in a countif() function Scott buckwalter Excel Worksheet Functions 9 August 11th 05 08:36 PM
Microsoft Query rejects "nz" function in Access Query Vaughan Excel Discussion (Misc queries) 0 May 4th 05 05:20 PM


All times are GMT +1. The time now is 03:00 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"