Count the Number of Column Criteria Met

rwmill9716

Active Member
Joined
May 20, 2006
Messages
493
Office Version
  1. 2013
Platform
  1. Windows
I have a table that has 1,000 rows. Each of the Gold columns (L, M, O, P, Q, R, X, AB, AE, AF) has a target that if met will add 1 to the count in column E.
Column/Target: L/1, M/A, O/>0, P/>0, Q/>0, R/<1.5, X/<1, AB/>0, AE/<0, AF/<-15

I need a macro that sums the count in column E for each row.
 

Attachments

  • Stock Criteria.jpg
    Stock Criteria.jpg
    189.3 KB · Views: 7

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
What is the reason you need to do this with a macro? this can be done with a formula.
Is it that you just don't want a formula in column E?
 
Upvote 0
Thanks, I would rather do it with a formula, a series of CountIF statements. I hadn't thought of that.
 
Upvote 0
okay,
try this:
Book1
ELMOPQRXABAEAF
1Target:1A>0>0>0<1.5<1>0<0<-15
2101A111101-1-16
Sheet1
Cell Formulas
RangeFormula
E2E2=(L2=1)+(M2="A")+(O2>0)+(P2>0)+ (Q2>0)+(R2<1.5)+(X2<1)+(AB2>0)+(AE2<0)+(AF2<-15)
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

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