# Combining "COUNTIF"

#### Tim in Toronto

##### New Member
Hi All,

I've been scratching my head over this one . . .

- I have 475 Retails stores listed

- These stores are classified & labelled as size "A", "B", "C", "D" or "E" depending on their retail space.

- I have a handful of these stores going through a Grand Opening this Fall 2007

- I would like to draw up a formula that goes through my store size column and count how many times it finds an "A" size store, but ALSO is flagged as "FALL 2007" in the column beside it.

I know the COUNTIF statement will count how many "A" I have listed, but that counts all 111 "A" size stores. Only 9 of those 111 stores are grand opening this Fall.

I are stuck. Help?
Tim

### Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},\$Z\$1:\$Z\$99,\$Y\$1:\$Y\$99),2,False) to lookup Y values to left of Z values.
Hi All,

I've been scratching my head over this one . . .

- I have 475 Retails stores listed

- These stores are classified & labelled as size "A", "B", "C", "D" or "E" depending on their retail space.

- I have a handful of these stores going through a Grand Opening this Fall 2007

- I would like to draw up a formula that goes through my store size column and count how many times it finds an "A" size store, but ALSO is flagged as "FALL 2007" in the column beside it.

I know the COUNTIF statement will count how many "A" I have listed, but that counts all 111 "A" size stores. Only 9 of those 111 stores are grand opening this Fall.

I are stuck. Help?
Tim

Either a Pivot Table or,

=SUMPRODUCT(--(ColumnBeside="Fall 2007"),--(SizeStoreRange="Size"))

Hi Tim

Say hello to Sumproduct:

=SUMPRODUCT((B2:B500="A")+0,(C2:C500="Fall 2007")+0)

Note: You can't use whole col refs with sumproduct (so no A:A etc). The criteria ("A", "Fall 2007") can be cell references holding these values (makes the formula more flexible).

Hi Rich,

That didn't seem to do anything. I just get a result of zero, but it should be 9.

I'm using =SUMPRODUCT((E2:E500="A")+0,(I2:I500="FALL 2007")+0)

Column E has all my store sizes listed.
Column I has "FALL 2007" beside the particular stores

Hi Rich,

That didn't seem to do anything. I just get a result of zero, but it should be 9.

I'm using =SUMPRODUCT((E2:E500="A")+0,(I2:I500="FALL 2007")+0)

Column E has all my store sizes listed.
Column I has "FALL 2007" beside the particular stores

You might want to check for leading/trailing spaces

Replies
7
Views
553
Replies
7
Views
130
Replies
5
Views
191
Replies
2
Views
463
Replies
3
Views
471

1,211,772
Messages
6,103,879
Members
447,883
Latest member
Hgiang0101

### 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.

### Which adblocker are you using?

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

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