Skip to main content

Lookup and retrieve entire column

To lookup and retrieve an entire column by matching a specific value, an INDEX and MATCH formula will do you a favor.

lookup and retrieve entire column 1

Lookup and retrieve an entire column based on a specific value
Sum an entire column up based on a specific value
Further analysis of an entire column based on a specific value


Lookup and retrieve an entire column based on a specific value

To get a list of Q2 sales according to the table above, you can first use the MATCH function to return the position of the Q2 sales, and which will be fed to INDEX to retrieve the values at the position.

Generic syntax

=INDEX(return_range,0,MATCH(lookup_value,lookup_array,0))

√ Note: This is an array formula that requires you to enter with Ctrl + Shift + Enter.

  • return_range: The range where you want the combination formula to return the Q2 sales list from. Here refers to the sales range.
  • lookup_value: The value the combination formula used to find its corresponding sales information. Here refers to the given quarter.
  • lookup_array: The range of cells where to match the lookup_value. Here refers to the quarter headers.
  • match_type 0: Forces MATCH to find the first value that exactly equals to the lookup_value.

To get a list of Q2 sales, please copy or enter the formula below in the cell I6, press Ctrl + Shift + Enter, and then double click on the cell and press F9 to get the result:

=INDEX(C5:F11,0,MATCH("Q2",C4:F4,0))

Or, use a cell reference to make the formula dynamic:

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

lookup and retrieve entire column 2

Explanation of the formula

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

  • MATCH(I5,C4:F4,0): The match_type 0 forces the MATCH function to return the position of Q2, the value in I5, in the range C4:F4, which is 2.
  • INDEX(C5:F11,0,MATCH(I5,C4:F4,0)) = INDEX(C5:F11,0,2): The INDEX function returns all the values in the 2nd column of the range C5:F11 in an array like this: {7865;4322;8534;5463;3252;7683;3654}. Note that to make the array visible in Excel, you should double click on the cell where you entered the formula, and then press F9.

Sum an entire column up based on a specific value

Since we have the sales list in hand now, to get the Q2 total sales volume would be an easy case for us. All we need to do is to add the SUM function to the formula to sum all the sales values from the list.

Generic syntax

=SUM(INDEX(return_range,0,MATCH(lookup_value,lookup_array,0)))

In this very example, to get the Q2 total sales volume, please copy or enter the formula below in the cell I8, and press Enter to get the result:

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

lookup and retrieve entire column 3

Explanation of the formula

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

  • MATCH(I5,C4:F4,0): The match_type 0 forces the MATCH function to return the position of Q2, the value in I5, in the range C4:F4, which is 2.
  • INDEX(C5:F11,0,MATCH(I5,C4:F4,0)) = INDEX(C5:F11,0,2): The INDEX function returns all the values in the 2nd column of the range C5:F11 in an array like this: {7865;4322;8534;5463;3252;7683;3654}.
  • SUM(INDEX(C5:F11,0,MATCH(I5,C4:F4,0))) = SUM({7865;4322;8534;5463;3252;7683;3654}): The SUM function sums all the values in the array, and then gets the Q2 total sales volume, $40,773.

Further analysis of an entire column based on a specific value

For additional processing on the Q2 sales list, you can simply add other functions such as SUM, AVERAGE, MAX, MIN, LARGE, etc. to the formula.

For example, to get an average sales volume during Q2, you can use the formula:

=AVERAGE(INDEX(C5:F11,0,MATCH(I5,C4:F4,0)))

To find out the highest sales during Q2, use one of the below formulas:

=MAX(INDEX(C5:F11,0,MATCH(I5,C4:F4,0)))
OR
=LARGE(INDEX(C5:F11,0,MATCH(I5,C4:F4,0)),1)


Related functions

Excel INDEX function

The Excel INDEX function returns the displayed value based on a given position from a range or an array.

Excel MATCH function

The Excel MATCH function searches for a specific value in a range of cells, and returns the relative position of the value.


Related Formulas

Lookup and retrieve entire row

To lookup and retrieve an entire row of data by matching a specific value, you can use the INDEX and MATCH functions to create an array formula.

Exact match with INDEX and MATCH

If you need to find out the information listed in Excel about a specific product, movie or a person, etc., you should make a good use of the combination of INDEX and MATCH functions.

Approximate match with INDEX and MATCH

There are times when we need to find approximate matches in Excel to evaluate employees' performance, grade students’ scores, calculate postage based on weight, etc. In this tutorial, we will talk about how to use the INDEX and MATCH functions to retrieve the results we need.

Case-sensitive lookup

You may know that you can combine the INDEX and MATCH functions, or use the VLOOKUP function to lookup values in Excel. However, the lookups aren’t case-sensitive. So, in order to perform a case-sensitive match, you should take advantage of the EXACT and CHOOSE functions.


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations