# How to Transpose Values Based on the Multiple Lookup Criteria

This post explains that how to transpose values from columns to rows based on the multiple lookup criteria in excel.

In the previous, we talked that how to transpose values from columns to rows using Paste Special Transpose, it’s just rearrange all data in a range and do not apply for any criteria.

## Transpose Values Based on the Multiple Lookup Criteria

If you want to lookup the value with multiple criteria, and then transpose the last results, you can use the INDEX function with the MATCH function to create a new formula.

For example, to transpose the values in both column B and Column C based on the multiple criteria: member’s name is equal to the range B2:B10, and month’s value is equal to the range C2:C10, then extract the bonus value from the range D2:D10. you can use the following array formula:

`=INDEX(\$D\$2:\$D\$10,MATCH(1,(\$B\$2:\$B\$10=\$F4)*(\$C\$2:\$C\$10=G\$3),0))`

Let’s see how the above formula works:

=(\$B\$2:\$B\$10=\$F4)

The above formula will check if each value in the range B2:B10 is equal to the value in Cell F4, if so, return TRUE, otherwise, returns FALSE. So the above formula returns an array result like this:

`{TRUE;FALSE;FALSE;TRUE;FALSE;FALSE;TRUE;FALSE;FALSE}`

=(\$C\$2:\$C\$10=G\$3)

The above formula will check if each month value in the range C2:C10 is equal to the value in Cell G3, if so, return TRUE, otherwise, returns FALSE. So the above formula returns an array result like this:

`{TRUE;TRUE;TRUE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE}`

=(\$B\$2:\$B\$10=\$F4)*(\$C\$2:\$C\$10=G\$3)

the above formula returns an array result like this:

`{1;0;0;0;0;0;0;0;0}`

x
How to Unmerge Cells and Fill Down Values in Excel

= MATCH(1,(\$B\$2:\$B\$10=\$F4)*(\$C\$2:\$C\$10=G\$3),0)

The MATCH function used the above array result(containing one and zero) to find the position of item “1”, it is actually the position of the bonus value that matched the multiple criteria. =INDEX(\$D\$2:\$D\$10,MATCH(1,(\$B\$2:\$B\$10=\$F4)*(\$C\$2:\$C\$10=G\$3),0))

The INDEX function extracts the value based on the position result returned by the above MATCH function. So it returns “\$100”in Cell G4. You can drag the Fill Handler in the Cell G4 to other cells to fill up the entire range G4:I6 as you need. ### Related Formulas

• Reverse a List or Range
If you want to reverse a list or range, you can use a combination of the INDEX function, the COUNTA function, the ROW function or ROWS function to create a new formula. you can use the following formula:=INDEX(\$A\$2:\$A\$5,COUNTA(\$A\$2:\$A\$5)-ROWS(\$C\$2:C2)+1)…
• Lookup the Value with Multiple Criteria
If you want to lookup the value with multiple criteria in a range, you can use a combination with the INDEX function and MATCH function to create an array formula…

### Related Functions

• Excel INDEX function
The Excel INDEX function returns a value from a table based on the index (row number and column number)The INDEX function is a build-in function in Microsoft Excel and it is categorized as a Lookup and Reference Function.The syntax of the INDEX function is as below:= INDEX (array, row_num,[column_num])…
• Excel MATCH function
The Excel MATCH function search a value in an array and returns the position of that item.The syntax of the MATCH function is as below:= MATCH  (lookup_value, lookup_array, [match_type])….

Related Posts

VLOOKUP From Another Sheet Not Working

In the previous post, you should know that how to fix or remove the #N/A error when using VLOOKUP formula to lookup value from another sheet. And this post will show you reasons why your VLOOKUP formula is not working ...

Case Sensitive Lookup with SUMPRODUCT and EXACT

Today, we will show you how to use SUMPRODUCT and EXACT to perform a case sensitive exact match. In this article, we provide a simple example to calculate bonus for employees whose names are case-sensitive. If you meet similar scenarios ...

Basic Usage of INDEX & MATCH – Case Sensitive Lookup

In Excel, INDEX function and MATCH function are often used together for retrieving data from a particular position. MATCH function is one of Excel lookup & reference functions that can perform approximate match or exact match by setting different match ...

Basic Rates Calculation by VLOOKUP Based on Weight Band

Microsoft Excel provides many functions that can execute logical test, search data, return current date and something else. They are very useful in daily work. And Excel VLOOKUP function is one of Excel most frequently used functions. It belongs to ...

Basic Grade Calculation by VLOOKUP Function – Approximate Match

In Excel, except combination INDEX+MATCH, we can also apply other functions to search data, for example VLOOKUP function. Like MATCH function, VLOOKUP function is one of Excel lookup & reference functions that can perform approximate match or exact match by ...

Basic Discount Calculation with VLOOKUP Function

In Excel, except combination INDEX+MATCH, we can also apply other functions to search data, for example VLOOKUP function. Like MATCH function, VLOOKUP function is one of Excel lookup & reference functions that can perform approximate match or exact match by ...

Basic Usage of INDEX & MATCH – Exact Match

In Excel, INDEX function and MATCH function are often used together for returning value or cell reference or range reference from specified position. And MATCH function is one of Excel lookup & reference functions that can perform approximate match or ...

Basic Usage of INDEX & MATCH – Approximate Match

In Excel, INDEX function and MATCH function are often used together for returning value or cell reference or range reference from specified position. And MATCH function is one of Excel lookup & reference functions that can perform approximate match by ...

Approximate Match with Multiple Criteria by INDEX & MATCH

In Excel, INDEX function and MATCH function are often used together for returning data from specific position. And MATCH function is one of Excel lookup & reference functions that can return approximate value by setting match type. Above all, through ...

How to Count Cells Not Equal to One of Many Things in Excel

This post will guide you how to count the number of cells that are not equal to many things in a given range cells using a formula in Excel 2013/2016. You can easily to count cells not equal to a ...

Sidebar