return the row or column number

There may be occasions when you need to know the number of a column or even the row number in order to use it within another formula.

You could simple count the number of columns or rows and hard code this into a formula but if the structure of your worksheet changes, the formulas using the number may not work properly.

You can dynamically reference columns or rows with a very simple function

To return the column number use the COLUMN function as detailed below


The same can be used to return a row number



If you want to return the total number of columns within a range or array


And the same for rows



Get more great content from Rousseau Associates

Start your project with us today

Call +44 (0)1757 269461

Discuss your requirements today