Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
FPJ FPJ is offline
external usenet poster
 
Posts: 19
Default COUNTIF or SUMPRODUCT formula

How would you write the formula when there are 3 columns involve?

A B C
2/3/2006 8877 Gerry
2/12/2006 8877 James
2/22/2006 5566 Cindy
3/1/2006 1122 Gerry
3/3/2006 0011 Gerry
3/11/2006 8877 James
3/11/2006 3344 Cindy
3/15/2006 8877 James
3/29/2006 1122 James

I'd like to get the number of occurence of code 8877 (column B) by James
(column C) that were made in month of March (column C). The result should be
2. Thanks in advance.



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default COUNTIF or SUMPRODUCT formula

Just in March of 2006?

=sumproduct(--(text(a1:a10,"yyyymm")="200603"),
--(b1:b10=8877),--(c1:c10="James"))

Adjust the range to match, but you can't use the whole column.

FPJ wrote:

How would you write the formula when there are 3 columns involve?

A B C
2/3/2006 8877 Gerry
2/12/2006 8877 James
2/22/2006 5566 Cindy
3/1/2006 1122 Gerry
3/3/2006 0011 Gerry
3/11/2006 8877 James
3/11/2006 3344 Cindy
3/15/2006 8877 James
3/29/2006 1122 James

I'd like to get the number of occurence of code 8877 (column B) by James
(column C) that were made in month of March (column C). The result should be
2. Thanks in advance.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default COUNTIF or SUMPRODUCT formula

Insert column A...copy your dates to read the month and year 2006-03. Insert
Column B...concatenate (D1,"-",C1) and run the formula to the end of your
data...which will yield 8877-2006-03 (for James). Anywhere on your
worksheet...or in a new worksheet, enter Countif(b1:b10,"8877-2006-03").

"Dave Peterson" wrote:

Just in March of 2006?

=sumproduct(--(text(a1:a10,"yyyymm")="200603"),
--(b1:b10=8877),--(c1:c10="James"))

Adjust the range to match, but you can't use the whole column.

FPJ wrote:

How would you write the formula when there are 3 columns involve?

A B C
2/3/2006 8877 Gerry
2/12/2006 8877 James
2/22/2006 5566 Cindy
3/1/2006 1122 Gerry
3/3/2006 0011 Gerry
3/11/2006 8877 James
3/11/2006 3344 Cindy
3/15/2006 8877 James
3/29/2006 1122 James

I'd like to get the number of occurence of code 8877 (column B) by James
(column C) that were made in month of March (column C). The result should be
2. Thanks in advance.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
FPJ FPJ is offline
external usenet poster
 
Posts: 19
Default COUNTIF or SUMPRODUCT formula

I am getting a #VALUE! result. This may be due to some cells in column A have
the word VOID and some cells in columns B and C are blank. What will be the
formula? Thanks again in advance.

"Dave Peterson" wrote:

Just in March of 2006?

=sumproduct(--(text(a1:a10,"yyyymm")="200603"),
--(b1:b10=8877),--(c1:c10="James"))

Adjust the range to match, but you can't use the whole column.

FPJ wrote:

How would you write the formula when there are 3 columns involve?

A B C
2/3/2006 8877 Gerry
2/12/2006 8877 James
2/22/2006 5566 Cindy
3/1/2006 1122 Gerry
3/3/2006 0011 Gerry
3/11/2006 8877 James
3/11/2006 3344 Cindy
3/15/2006 8877 James
3/29/2006 1122 James

I'd like to get the number of occurence of code 8877 (column B) by James
(column C) that were made in month of March (column C). The result should be
2. Thanks in advance.


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default COUNTIF or SUMPRODUCT formula

I don't think it's the Void in your data in column A. Do you have any errors in
any of those ranges (#value!'s??).

Also, make sure that each range has the same number of cells.

If this doesn't help, post the formula you used.

FPJ wrote:

I am getting a #VALUE! result. This may be due to some cells in column A have
the word VOID and some cells in columns B and C are blank. What will be the
formula? Thanks again in advance.

"Dave Peterson" wrote:

Just in March of 2006?

=sumproduct(--(text(a1:a10,"yyyymm")="200603"),
--(b1:b10=8877),--(c1:c10="James"))

Adjust the range to match, but you can't use the whole column.

FPJ wrote:

How would you write the formula when there are 3 columns involve?

A B C
2/3/2006 8877 Gerry
2/12/2006 8877 James
2/22/2006 5566 Cindy
3/1/2006 1122 Gerry
3/3/2006 0011 Gerry
3/11/2006 8877 James
3/11/2006 3344 Cindy
3/15/2006 8877 James
3/29/2006 1122 James

I'd like to get the number of occurence of code 8877 (column B) by James
(column C) that were made in month of March (column C). The result should be
2. Thanks in advance.


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
FPJ FPJ is offline
external usenet poster
 
Posts: 19
Default COUNTIF or SUMPRODUCT formula

You're right. It was just my typo. The formula works just fine. Thanks a lot
again. Also, just want to mention, I added a $ sign for all the ranges so I
can just copy and paste since I am working on a very large data (lots of
cells to fill in with the formula). Again, Thank You.

"Dave Peterson" wrote:

I don't think it's the Void in your data in column A. Do you have any errors in
any of those ranges (#value!'s??).

Also, make sure that each range has the same number of cells.

If this doesn't help, post the formula you used.

FPJ wrote:

I am getting a #VALUE! result. This may be due to some cells in column A have
the word VOID and some cells in columns B and C are blank. What will be the
formula? Thanks again in advance.

"Dave Peterson" wrote:

Just in March of 2006?

=sumproduct(--(text(a1:a10,"yyyymm")="200603"),
--(b1:b10=8877),--(c1:c10="James"))

Adjust the range to match, but you can't use the whole column.

FPJ wrote:

How would you write the formula when there are 3 columns involve?

A B C
2/3/2006 8877 Gerry
2/12/2006 8877 James
2/22/2006 5566 Cindy
3/1/2006 1122 Gerry
3/3/2006 0011 Gerry
3/11/2006 8877 James
3/11/2006 3344 Cindy
3/15/2006 8877 James
3/29/2006 1122 James

I'd like to get the number of occurence of code 8877 (column B) by James
(column C) that were made in month of March (column C). The result should be
2. Thanks in advance.

--

Dave Peterson


--

Dave Peterson

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
Sumproduct, If, Sumif, Countif, Match?? Herman56 Excel Discussion (Misc queries) 0 March 30th 06 01:40 PM
Adding "OR" to a Sumproduct Formula Duke Carey Excel Worksheet Functions 0 March 21st 06 06:41 PM
I have a question regarding countif formula. Fahad Farid Ansari Excel Worksheet Functions 6 October 1st 05 11:57 PM
Formula format for Count or Countif funtion with two criterias Debi Excel Worksheet Functions 2 September 26th 05 08:23 PM
Which formula to use? countif, sumif, sumproduct zubee Excel Discussion (Misc queries) 3 September 2nd 05 08:16 PM


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