Excel training
First written: Feb-2024
last changed Mar-2024
last changed Mar-2024
Adding a COUNTIF formula
Here we want to add a formula to count how many cells are set to 1 and place this information into the total row cell E22
- As before, we could simply type in the formula into cell
E22but this time we will use an assistant to see how this works. Click onE22and then click on the fx button to the left of the Formula Bar input field at the top of the worksheet
- This will show an Insert Function popup

- Type "COUNT" into the Search field, and click [Go]
- Select
COUNTIFfrom the list of found functions in the list
, then click [OK] - Click on the Range input field

- Then using the mouse left-button, click and hold on cell
E21and drag up toE2(tip, you may need/ want to move the popup out the way while doing this)
- You should now see Range set to
E2:E21on the popup field - Enter
1into the Criteria field - Click [OK]; and you should now see
11inE22and the Formula Bar reads=COUNTIF(E2:E21,1)
Advanced Note
You can also use the COUNTIFS function to apply multiple conditions, e.g. =COUNTIFS(E2:E21,1,B2:B21,"Alex") (resulting in 1 in this case); COUNTIFS can take any number of range,value pairs
chevron_leftStep-9-add-a-conditional-formula
Step-11-utilising-binary-cellschevron_right
Comments
New Comment