A series of COUNTIF formula

Annmarcook

New Member
Joined
Aug 8, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
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
Joined
Dec 30, 2008
Messages
12,676
Office Version
  1. 365
Platform
  1. Windows
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"
 

Watch MrExcel Video

Forum statistics

Threads
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.
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
Top