To get the nth MATCH with VLOOKUP, you'll need to add a helper column to your table that constructs a unique id that includes the count. If this isn't practical, you can use an array formula based on INDEX and MATCH...

Note: Excel has a built-in data validation rules for dropdown lists. This page explains how to create a custom validation rule when you want to *prevent* a user from entering a value in a list.
To allow only values...

To count the number of cells that contain negative numbers in a range of cells, you can use the COUNTIF function. In the generic form of the formula (above) rng represents a range of cells that contain numbers.
In the...

Note: Excel has a built-in data validation rules for dropdown lists. This page explains how to create a your own validation rule for lists when you don't want the dropdown behavior.
To allow only values from a list in...

One way to track attendance is with simple formulas based on the COUNTIF function. In the example shown, the formula in M5 is:
=COUNTIF(C5:L5,"x")
How this formula works
This formula simply uses COUNTIF...

To count the number of cells equal to one of many values, you can use the COUNTIF function inside of SUMPRODUCT. In the generic form of the formula (above) rng represents a range of cells, and things represents the...

Note: Excel contains many built-in "presets" for highlighting values with conditional formatting, including a preset to highlight duplicate values. However, if you want more flexibility, you can highlight duplicates...

To retrieve the first match in two ranges of values, you can use a formula based on the INDEX, MATCH, and COUNTIF functions.
In the example shown, the formula in G5 is:
=INDEX(range2,MATCH(TRUE,COUNTIF(range1,range2)>...

Preface
This is an annoyingly long introduction, but the context is important, sorry!
If you try to count very long numbers (16+ digits) in a range with COUNTIF, you may see incorrect results, due to a bug in how...

To track student class enrollment when classes may appear in any order, you can create a table with additional columns, one for each class, to mark and count enrollment. In the example shown, the formula in G6 is:
=...

To count cells not equal to many things (i.e. not equal to x, y, z, etc.), you can use a formula based on COUNTIF, SUMPRODUCT, and COUNTA.
In the example shown, the formula in H5 is:
=COUNTA(B4:C9)-SUMPRODUCT(COUNTIF...

If you need to determine if a range or column contains specific text (a specific substring or partial text), you can use a formula based on the COUNTIF function with wildcards.
In the example shown, the formula in D5...

To count cells that contain either one value or another, you an either use a helper column then tally up the count, or a more complex single cell formula.
Background
When you count cells with "OR" criteria, you need...

To generate a count with a percentage breakdown, you can use the COUNTIF or COUNTIFS function, together with COUNTA.
In the example shown the formula in H4 is:
=COUNTIF(category,F4)/COUNTA(category)
How this formula...

Excel contains a built-in preset for highlighting duplicate values with conditional formatting, but it only works at the cell level. If you want to find and highlight duplicate columns, you'll need to use your own...