Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Use Data Form to input, edit and delete records in Excel
  • Understanding Pivot Tables in Excel
  • Conditional Formatting New Rule with Formulas in Excel
  • How to Sort by Color in Excel
  • How to calculate correlation coefficient Correlation in Excel

References

  • Count rows that contain specific values in Excel
  • How to get last column number in range in Excel
  • How to create dynamic named range with OFFSET in Excel
  • Lookup entire row in Excel
  • Count unique text values with criteria

Data Validations

  • Excel Data validation don’t exceed total
  • Data validation must not exist in list
  • Excel Data validation allow uppercase only
  • Excel Data validation must contain specific text
  • Prevent invalid data entering in specific cells

Get column index in Excel Table

by

To get the index of a column in an Excel Table, you can use the MATCH function. See example below:

Formula

=MATCH(name,Table[#Headers],0)

Explanation

In the example shown, the formula in I4 is:

=MATCH(H4,Table1[#Headers],0)

When the formula is copied down, it returns an index for each column listed in column H. Getting an index like this is useful when you want to refer to table columns by index in other formulas, like VLOOKUP, INDEX and MATCH, etc.

Worked Example:   Find longest string in column in Excel

How this formula works

This is a standard MATCH formula where the lookup values come from column H, the array is the headers in Table1, and match type is zero, to force an exact match.

Worked Example:   Match first error in Excel

The only trick to the formula is the use of a structured reference to return a range for the table headers to the MATCH function:

Table1[#Headers]

The nice thing about this reference is that it will automatically adjust to any changes in the table. Even when columns are added or removed, the reference will continue to return the correct range.

Post navigation

Previous Post:

How to calculate average last N values in a table in Excel

Next Post:

How to create running total in an Excel Table

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IF with boolean logic in Excel
  • SWITCH function example in Excel
  • How to use Excel XOR Function
  • How to use Excel NOT Function
  • Extract multiple matches into separate rows in Excel

Date Time

  • Get month from date in Excel
  • SECOND function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate next anniversary date or birthday in Excel
  • WORKDAY.INTL function: Description, Usage, Syntax, Examples and Explanation
  • Convert date string to date time in Excel

Grouping

  • If cell contains one of many things in Excel
  • Running count group by n size in Excel
  • Group numbers with VLOOKUP in Excel
  • Group times into unequal buckets in Excel
  • Map inputs to arbitrary values in Excel

General

  • Count cells that contain errors in Excel
  • Share Excel data with Word documents
  • How to create dynamic worksheet reference in Excel
  • Excel Operators
  • How to increase by percentage in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning