# A series of COUNTIF formula

#### Annmarcook

##### New Member
Good Morning,
I'm new to this forum and to excel. I have created a formula that contains a series of COUNTIF calculations. I tried COUNTIFS but I couldn't persuade it to handle counting cells that are not in a continuous range. This is the formula: =COUNTIF(Geography!C36:F36,"<>blw")+COUNTIF(Geography!H36:I36,"<>blw")+COUNTIF(Geography!K36:M36,"<>blw")+COUNTIF(Geography!O36:P36,"<>blw")+COUNTIF(Geography!R36,"<>blw")+COUNTIF(Geography!W36,"<>blw")+COUNTIF(Geography!Y36:Z36,"<>blw") and it works okay. However, I now need to divide the final total by another CELL. Simply adding /B11 doesn't work. Has anyone got any ideas please?

### Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

#### jasonb75

##### Well-known Member
You need to enclose the whole thing in parentheses before dividing.

=(COUNTIF(Geography!C36:F36,"<>blw")+COUNTIF(Geography!H36:I36,"<>blw")+COUNTIF(Geography!K36:M36,"<>blw")+COUNTIF(Geography!O36:P36,"<>blw")+COUNTIF(Geography!R36,"<>blw")+COUNTIF(Geography!W36,"<>blw")+COUNTIF(Geography!Y36:Z36,"<>blw"))/B11

You have used the correct method though, countifs or other similar functions do not work with split ranges.

Another way that might work, you have 9 columns that should not be counted so in theory,

=(COUNTIF(Geography!C36:Z36,"<>blw")-9)/B11

although that is assuming that none of the excluded columns can contain "blw"

Replies
1
Views
177
Replies
1
Views
154
Replies
6
Views
196
Replies
0
Views
305
Replies
9
Views
485

1,130,176
Messages
5,640,614
Members
417,158
Latest member
jimmy1986

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