Countif Help

Johnstog

Board Regular
Joined
Sep 11, 2007
Messages
163
I have kind of a complex equation I could use assistance with.

In column B:B I have a date "1/01/2011"
In Column E:E I have various units "BI201", "BI205", etc.
In column H:H i have and item code "P", "IFT", "L" etc.

What I need help with is this:
I need to know for all dates in January 2011
How many times did "BI201" match up to the Code "P", "IFT", "L"

Any help you can provide would be greatly appreciated. Thanks ahead of time for any help you can provide.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I have kind of a complex equation I could use assistance with.

In column B:B I have a date "1/01/2011"
In Column E:E I have various units "BI201", "BI205", etc.
In column H:H i have and item code "P", "IFT", "L" etc.

What I need help with is this:
I need to know for all dates in January 2011
How many times did "BI201" match up to the Code "P", "IFT", "L"

Any help you can provide would be greatly appreciated. Thanks ahead of time for any help you can provide.

I think you should look up pivot tables for your needs. Look in the help, but the pivot tables should give you all the info you need without the need for formulas.

Regards

Bolo
 
Upvote 0
I have kind of a complex equation I could use assistance with.

In column B:B I have a date "1/01/2011"
In Column E:E I have various units "BI201", "BI205", etc.
In column H:H i have and item code "P", "IFT", "L" etc.

What I need help with is this:
I need to know for all dates in January 2011
How many times did "BI201" match up to the Code "P", "IFT", "L"

Any help you can provide would be greatly appreciated. Thanks ahead of time for any help you can provide.
What version of Excel are you using?
 
Upvote 0
2003 Excel
Let's assume this is your data:

Book1
BEH
21/31/2011BI208P
33/11/2011BI210P
41/4/2011BI201P
51/19/2011BI203L
63/29/2011BI207L
72/1/2011BI204IFT
81/21/2011BI201P
91/18/2011BI201XX
103/13/2011BI208P
111/26/2011BI201P
124/20/2011BI203L
131/15/2011BI201P
142/5/2011BI201L
1512/23/2010BI207IFT
164/9/2011BI200P
172/18/2011BI203IFT
182/2/2011BI210L
191/17/2011BI208L
202/18/2011BI209XX
Sheet1

Use cells to hold the criteria:
  • J2 = the 1st of the month date for the month/year to be counted for. For example, to count for Jan 2011 enter the date 1/1/2011.
  • K2 = some unit code like BI201
  • L2 = some item code like P
Then:

=SUMPRODUCT(--(B2:B20-DAY(B2:B20)+1=J2),--(E2:E20=K2),--(H2:H20=L2))

Note that with SUMPRODUCT you *can't* use entire columns as range references unless you're using Excel 2007.
 
Upvote 0
This worked well. Thanks.

I need to calculate by day of week as well. So, if =SUMPRODUCT(--(B2:B20-DAY(B2:B20)+1=J2),....... Is what you use to get the Month & Year, what would I use for Day of Week?

I need to know how many fall on each day of the week.
 
Upvote 0
This worked well. Thanks.

I need to calculate by day of week as well. So, if =SUMPRODUCT(--(B2:B20-DAY(B2:B20)+1=J2),....... Is what you use to get the Month & Year, what would I use for Day of Week?

I need to know how many fall on each day of the week.

You mean on Monday, Tuesday, etc. separately without any reference to the month/year of these days?
 
Upvote 0
I created a column F:F that takes the date from column B:B and I formatted it to only say the day of the week (Mon, Tues, Wed, etc...). However, Excel still recognizes the data in this column as a day of the week.

I can run the SUMPRODUCT formula, but it gives me a zero value because the data formated in the F:F column is still an actual date.
 
Upvote 0
I created a column F:F that takes the date from column B:B and I formatted it to only say the day of the week (Mon, Tues, Wed, etc...). However, Excel still recognizes the data in this column as a day of the week.

I can run the SUMPRODUCT formula, but it gives me a zero value because the data formated in the F:F column is still an actual date.

use the weekday function to convert a date into a number 1 to depending on the day and then use this in the sumproduct.

Regards

Bolo
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,814
Members
452,945
Latest member
Bib195

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top