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

Data Analysis

  • What-If Analysis: Scenarios and Goal Seek in Excel
  • Conditional Formatting Icon Sets Examples in Excel
  • Get column name from index in Excel Table
  • Conditional Formatting Color Scales Examples in Excel
  • How To Insert and Customize Sparklines in Excel

References

  • How to get first row number in range in Excel
  • How to use Excel ROW Function
  • Last row number in range
  • Extract all partial matches in Excel
  • How to get address of last cell in range in Excel

Data Validations

  • Excel Data validation require unique number
  • Excel Data validation don’t exceed total
  • Excel Data validation date in specific year
  • Excel Data validation allow weekday only
  • Excel Data validation exists in list

Lookup and sum column in Excel

by

This tutorial shows how to Lookup and sum column in Excel  using the example below;

Formula

=SUM(INDEX(data,0,MATCH(val,header,0)))

Explanation

To lookup and return the sum of a column, you can use the a formula based on the INDEX, MATCH and SUM functions. In the example shown, the formula in I7 is:

=SUM(INDEX(C5:F11,0,MATCH(I6,C4:F4,0)))

How this formula works

The core of this formula uses the INDEX and MATCH function in a special way to return a full column instead of a single value. Working from the inside out, the MATCH function is used to find the correct column number for the fruit in I6:

MATCH(I6,C4:F4,0)

MATCH return 2 inside the INDEX function as the column_num argument, where the array is set to the range C5:F11, which includes data for all fruits.

Worked Example:   How to get last row in text data in Excel

The tricky part of the formula is the row_num argument, which is set to zero. Setting row to zero causes INDEX to return all values in the matching column in an array like this:

=SUM({6;12;4;10;0;9;6})

The SUM function then returns the sum of all items in the array, 47.

Worked Example:   Find longest string with criteria in Excel

Post navigation

Previous Post:

Weighted average in Excel

Next Post:

Win loss points calculation in Excel

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 function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel OR Function
  • Complete List of Excel Logical Functions, References and Examples
  • FALSE function: Description, Usage, Syntax, Examples and Explanation
  • Not Equal To ‘<>‘ operator in Excel

Date Time

  • TODAY function: Description, Usage, Syntax, Examples and Explanation
  • Convert text timestamp into time in Excel
  • Series of dates by day
  • Get first day of previous month in Excel
  • WEEKNUM function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Calculate conditional mode with criteria in Excel
  • Map text to numbers in Excel
  • Categorize text with keywords in Excel
  • Group times into 3 hour buckets in Excel
  • If cell contains one of many things in Excel

General

  • Check if multiple cells have same value in Excel
  • Automatically fill series of cells in Excel using AutoFill
  • How to generate random times at specific intervals in Excel
  • How to generate random date between two dates in Excel
  • Spell Check in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning