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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

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
168
Replies
1
Views
119
Replies
6
Views
189
Replies
0
Views
287
Replies
9
Views
482

1,128,107
Messages
5,628,726
Members
416,333
Latest member
Time2Learn

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?

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

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