A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count rows that match criteria in 2 different column cell ranges



 
 
Thread Tools Display Modes
  #1  
Old December 6th, 2005, 08:01 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Count rows that match criteria in 2 different column cell ranges

I have a spreadsheet that lists all customer orders for the year - each order
is a row. I need to count the number of orders per customer per month.

I'm having trouble figuring out what formula to use to count the number of
rows in which the customer column (a range named "customer") = "xxx" and the
month column (a range named "month") = 1 (for January).

I've tried several combinations of things and keep getting errors. I've
tried ROWS, COUNTIF, IF with COUNTIFs and/or ROWS, etc. to the point that I'm
thoroughly confused. I'm sure this is probably simple but I just can't seem
to see it at this point.

Thanks for your help!
--
JoAnn
  #2  
Old December 6th, 2005, 09:34 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Count rows that match criteria in 2 different column cell ranges

Enter the customer name in D1, and the number of the month in D2, and try
this:

=SUMPRODUCT((customer=D1)*(MONTH(month)=D2))

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"JoAnn" wrote in message
...
I have a spreadsheet that lists all customer orders for the year - each

order
is a row. I need to count the number of orders per customer per month.

I'm having trouble figuring out what formula to use to count the number of
rows in which the customer column (a range named "customer") = "xxx" and

the
month column (a range named "month") = 1 (for January).

I've tried several combinations of things and keep getting errors. I've
tried ROWS, COUNTIF, IF with COUNTIFs and/or ROWS, etc. to the point that

I'm
thoroughly confused. I'm sure this is probably simple but I just can't

seem
to see it at this point.

Thanks for your help!
--
JoAnn


  #3  
Old December 9th, 2005, 05:51 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Count rows that match criteria in 2 different column cell ranges

JoAnn: This may sound difficult but, it is really very easy. Lets assume
your data looks like this...

Customer Month
JOE 1
JOE 1
LARRY 1
LARRY 1
LARRY 1
KRISTI 1
JOE 2
HAYDEN 2
LARRY 2
KRISTI 2

You will a title above each column (Customer, Month). Click on the top,
left cell of your data, in this case "Customer". On your toolbar, click
"Data", then click "Pivot Table and PivotTable Chart". In the dialogue box
that appears, click "Next", then "Next" again, then click "Layout". Drag the
"Customer" box on the right over to the Row area, then drag the "Month" box
over to the Row area and drop it under Customer. Then drag the "Customer"
box (again, from the right) over to the Data area. Once you drop it, it
should read "Count of Customer". If it doesn't, you can double-click it and
change its function. Then click OK. Now select where you want the Pivot
Table (a new sheet, or the existing one) and click Finish. Your result will
look like this...

Count of Customer
Customer Month Total
HAYDEN 2 1
HAYDEN Total 1
JOE 1 2
2 1
JOE Total 3
KRISTI 1 1
2 1
KRISTI Total 2
LARRY 1 3
2 1
LARRY Total 4
Grand Total 10

So, by month, by customer, you get a count of customers. Hope this helps.

"JoAnn" wrote:

I have a spreadsheet that lists all customer orders for the year - each order
is a row. I need to count the number of orders per customer per month.

I'm having trouble figuring out what formula to use to count the number of
rows in which the customer column (a range named "customer") = "xxx" and the
month column (a range named "month") = 1 (for January).

I've tried several combinations of things and keep getting errors. I've
tried ROWS, COUNTIF, IF with COUNTIFs and/or ROWS, etc. to the point that I'm
thoroughly confused. I'm sure this is probably simple but I just can't seem
to see it at this point.

Thanks for your help!
--
JoAnn

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Intervals of 1 Numeric value in a Row and Return Count down Column Sam via OfficeKB.com Worksheet Functions 8 October 4th, 2005 04:37 PM
How cell ranges are handled by worksheet functions/row column matc Martin Worksheet Functions 1 September 30th, 2005 01:51 PM
generate multiple rows based on cell value Theresa Worksheet Functions 0 May 25th, 2005 11:18 PM
GET.CELL Biff Worksheet Functions 2 November 24th, 2004 07:16 PM
Column E cell contents added into Column D contents (not overwriting data but mixing) creativetechguy General Discussion 2 August 5th, 2004 07:32 PM


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


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