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

Data Analysis

  • Understanding Pivot Tables in Excel
  • Calculate Conditional Percentile ‘IF’ in table in Excel
  • How to calculate average last N values in a table in Excel
  • Number and Text Filters Examples in Excel
  • How to create running total in an Excel Table

References

  • Merge tables with VLOOKUP in Excel
  • Count rows with at least n matching values
  • Lookup entire row in Excel
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • How to reference named range different sheet in Excel

Data Validations

  • Excel Data validation no punctuation
  • Excel Data validation whole percentage only
  • Excel Data validation don’t exceed total
  • Excel Data validation with conditional list
  • Excel Data validation must not contain

Sum range with INDEX in Excel

by

This tutorial shows how to calculate Sum range with INDEX in Excel using the example below;

 Formula

=SUM(INDEX(data,0,column))

Explanation

To sum all values in a column or row, you can use the INDEX function to retrieve the values, and the SUM function to return the sum.  This technique is useful in situations where the row or column being summed is dynamic, and changes based on user input.  In the example shown, the formula in H6 is:

=SUM(INDEX(data,0,H5))

where “data” is the named range C5:E9.

How this formula works

The INDEX function looks up values by position. For example, this formula retrieves the value for Acme sales in Jan:

=INDEX(data,1,1)

The INDEX function has a special and non-obvious behavior: when the row number argument is supplied as zero or null, INDEX retrieves all values in the column referenced by the column number argument. Likewise, when the column number is supplied as zero or nothing, INDEX retrieves all values in the row referenced by the row number argument:

=INDEX(data,0,1) // all of column 1
=INDEX(data,1,0) // all of row 1

In the example for formula, we supply the named range “data” for array, and we pick up the column number from H2. For row number, we deliberately supply zero. This causes INDEX to retrieve all values in column 2 of “data’. The formula is solved like this:

=SUM(INDEX(data,0,2))
=SUM({9700;2700;23700;16450;17500})
=70050

Other calculations

You can use the same approach for other calculations by replacing SUM with AVERAGE, MAX, MIN, etc. For example, to get an average of values in the third month, you can use:

=AVERAGE(INDEX(data,0,3))

Post navigation

Previous Post:

COSH function: Description, Usage, Syntax, Examples and Explanation

Next Post:

Excel Data validation require unique number

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, AND, OR and NOT Functions Examples in Excel
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • How to return blank in place of #DIV/0! error in Excel
  • Nested IF function example in Excel
  • SWITCH function example in Excel

Date Time

  • How to calculate quarter from date in Excel
  • Calculate total hours that fall between two times in Excel
  • Get date from day number in Excel
  • WORKDAY function: Description, Usage, Syntax, Examples and Explanation
  • Get days between dates ignoring years in Excel

Grouping

  • Calculate conditional mode with criteria in Excel
  • Map text to numbers in Excel
  • Group numbers with VLOOKUP in Excel
  • Categorize text with keywords in Excel
  • How to randomly assign data to groups in Excel

General

  • How to calculate percentage discount in Excel
  • Find, Select, Replace and Go To Special in Excel
  • How to calculate percent of students absent in Excel
  • Count cells that contain errors in Excel
  • How to create dynamic named range with INDEX in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning