I. Intro
The COLUMN function can be used to return the column number (the column the cell is in) of the specified cell.
Note: If you want to get the row number of the cell, you can use the ROW function. For more details, see ROW function for Sheets.
II. About the function
- Formula: =COLUMN([cell reference])
- Note: The COLUMN function has only one argument, which is the cell whose column number you want to query. If you omit this argument, it will return the column number of the cell where the formula is located.
- Example: =COLUMN(C1) returns the column number where C1 is located.
250px|700px|reset
III. Steps
Use the function
- Open the spreadsheet, select a cell, and enter the formula =COLUMN([cell reference]).
- Press Enter to get the result.
250px|700px|reset
Delete the function
Select the cell with the function and press Delete.
IV. Use cases
Use COLUMN with VLOOKUP
When using the VLOOKUP function to extract the value of a column, you need to fill in the corresponding column number. When there are many columns in the sheet, you can use the COLUMN function to quickly get the column number.
For example, you can use the formula =VLOOKUP(B8,A1:E5,COLUMN(E2)) to find the sales of different employees, as shown in the following figure.
- B8: Represents the employee to be queried.
- A1:E5: Represents the area to be queried.
- COLUMN(E2): Represents the column number where the sales volume is located.
250px|700px|reset