COLUMN function in Excel

Excel comes with multiple Lookup and Reference functions that let you find matching values. The Lookup and Reference functions help you to work with arrays of data, and are particularly useful when you need to cross reference between different data sets

How to get last column number in range in Excel

You can get the last column in a range with a formula based on the COLUMN function. See example below: Formula =MIN(COLUMN(range))+COLUMNS(range)-1 Note: When given a single cell reference, the COLUMN function returns the column number for that reference. However, when given a range that contains multiple columns, the COLUMN function will return an array… read more »

How to get relative column numbers in a range in Excel

This tutorial shows how to get a full set of relative column numbers in a range using an array formula based on the COLUMN function. Formula {=COLUMN(range)-COLUMN(range.firstcell)+1} On the worksheet, this must be entered as multi-cell array formula using Control + Shift + Enter This is a robust formula that will continue to generate relative numbers… read more »

How to get address of last cell in range in Excel

To get the address of the first cell in a named range, you can use the ADDRESS function together with ROW and COLUMN functions. Formula =ADDRESS(ROW(range)+ROWS(range)-1,COLUMN(range)+COLUMNS(range)-1) Explanation In the example shown, the formula in G6 is: =ADDRESS(ROW(data)+ROWS(data)-1,COLUMN(data)+COLUMNS(data)-1) How this formula works The ADDRESS function builds an address based on a row and column number. Working… read more »

How to get address of named range in Excel

To get the full address of a named range with an Excel formula, you can use the ADDRESS function together with the ROW and COLUMN functions. Formula =ADDRESS(ROW(nr),COLUMN(nr))&”:”&ADDRESS(ROW(nr)+ROWS(nr)-1,COLUMN(nr)+COLUMNS(nr)-1) Explanation In the example shown, the formula in G5 is: =ADDRESS(ROW(data),COLUMN(data),4)&”:”&ADDRESS(ROW(data)+ROWS(data)-1, COLUMN(data)+COLUMNS(data)-1,4) where “data” is the named range B5:D10 How this formula works The core of this formula is… read more »

How to get first column number in range in Excel

You can get the first column (i.e. the starting column number) in a range with a formula based on the COLUMN function. Formula =MIN(COLUMN(range)) Explanation In the example shown, the formula in cell F5 is: =MIN(COLUMN(data)) where data is a named range for B5:D10 How this formula works When given a single cell reference, the COLUMN function… read more »

How to get address of first cell in range in Excel

To get the address of the first cell in a named range, you can use the ADDRESS function together with the ROW and COLUMN functions. See example below; Note: The ADDRESS function builds an address based on a row and column number. Formula =ADDRESS(ROW(range),COLUMN(range)) Explanation In the example shown, the formula in G5 is: =ADDRESS(ROW(data),COLUMN(data))… read more »

Merge tables with VLOOKUP in Excel

This tutorial shows how to  Merge tables with VLOOKUP in Excel using the example below; Formula =VLOOKUP($A1,table,COLUMN()-x,0) Explanation To merge tables, you can use the VLOOKUP function to lookup and retrieve data from one table to the other. To use VLOOKUP this way, both tables must share a common id or key. This article explains how join… read more »

Index and match on multiple columns in Excel

This tutorial shows how to calculate Index and match on multiple columns in Excel  using the example below; Formula {=INDEX(range1,MATCH(1,MMULT(–(range2=critera),TRANSPOSE(COLUMN(range2)^0)),0))} Explanation To lookup a value by matching across multiple columns, you can use an array formula based on the MMULT, TRANSPOSE, COLUMN, and INDEX. In the example shown, the formula in H4 is: {=INDEX(groups,MATCH(1,MMULT(–(names=G4),TRANSPOSE(COLUMN(names)^0)),0))} where “names” is… read more »

Get location of value in 2D array in Excel

This tutorial shows how to Get location of value in 2D array in Excel using the example below; Formula =SUMPRODUCT((data=MAX(data))*ROW(data))-ROW(data)+1 Explanation To locate the position of a value in a 2D array, you can use the SUMPRODUCT function. In the example shown, the formulas used to locate the row and column numbers of the max value… read more »

Max of every nth column in Excel

This tutorial shows how to calculate Max of every nth column in Excel using the example below; Formula {=MAX(IF(MOD(COLUMN(range)-COLUMN(range.first)+1,n)=0,range))} Explanation To get the max of every nth column, you can use an array formula based on the MAX, MOD, and COLUMN functions. In the example shown, the formula in M5 is: =MAX(IF(MOD(COLUMN(B5:K5)-COLUMN(B5)+1,L5)=0,B5:K5)) Note: this is an array formula and… read more »

Sidebar