ExcelCSE.com

Menu
  • Excel 101
  • Excel Functions
  • Excel Formula
  • Contact Us
How to Use Excel > Excel Formula > VLOOKUP MATCH – a Combination for a Solution

VLOOKUP MATCH – a Combination for a Solution

This is box title
Table of contents :
  • VLOOKUP MATCH – Solution for VLOOKUP REF Error
  • VLOOKUP MATCH – Solution for Dynamic col_index_num

VLOOKUP MATCH

VLOOKUP MATCH – Solution for VLOOKUP REF Error

The article “VLOOKUP REF Error – Causes and Solutions” explains the possibility of a REF error, or there is no REF error, but the resulting data is incorrect. The following article explains how to prevent these two problems.

The First Case

For example, there is data as shown below. How much is the total bill for all ordered drinks with the “Venti” size?

VLOOKUP MATCH

The Formula

=VLOOKUP(F4,$A$2:$D$13,4,FALSE)

The price for the “Venti” size is in the fourth column of table_array, so the col_index_num argument is number 4

The Result

VLOOKUP MATCH

What if you delete the column B (Tall Price)?

VLOOKUP MATCH

REF Error immediately appears in the column G. Is there any solution to prevent it, even though the column B “Tall Price” is removed the total bill for the “Venti” size could be known.

The solution is using VLOOKUP MATCH Formula.

The Modified Formula

=VLOOKUP(F4,$A$2:$D$13,MATCH("Venti",$A$1:$D$1,0),FALSE)

The MATCH function fills the col_index_num argument; the role is to find the “Venti” word position in range A1:D1.

What if you delete the column B (Tall Price)?

VLOOKUP MATCH

No REF error appears. Why? When the array dimension changes because of a delete operation, the MATCH function result changes too. When a “Tall Price” column exists the MATCH function returns 4, when you delete the “Tall Price” column the MATCH function returns 3.

The Second Case

For example, there is data like the picture below, the total bill for all “Tall” size drinks is $ 28.20.

VLOOKUP MATCH

What if you delete the column B (Tall Price)?

VLOOKUP MATCH

There is no error but the total bill changes to $33.35, it turns out the price of drinks changes from the “Venti” price size to the”Grande” price size. No error, but the formula result is wrong. It is a BIG problem.

How to prevent the wrong result? Of course, by displaying an error if the “Tall Price” column is deleted. The solution is using VLOOKUP MATCH Formula.

The Modified Formula

=VLOOKUP(F4,$A$2:$D$13,MATCH("Tall",$A$1:$D$1,0),FALSE)

The MATCH function occupies the col_index_num argument. The role is to find the “Tall” price column position.

If column B “Tall Price” is deleted the result as shown below.

VLOOKUP MATCH

NA error appears informing there is no price for the “Tall” size.

VLOOKUP MATCH – Solution for Dynamic col_index_num

For example, there is data as shown below. How do you calculate the total bill?

VLOOKUP MATCH

Unlike the previous case which only calculates the bills for one drink size. In the example above, the size of the ordered drink is different, so if you use the VLOOKUP function, the col_index_num argument could be numbers 2,3 or 4. If this is done manually one by one, it will be very time-consuming.

The solution is to use the MATCH function to find the drink price position according to their size.

The Formula

=VLOOKUP(F4,$A$2:$D$13,MATCH(G4,$A$1:$D$1,0),FALSE)

The Result

VLOOKUP MATCH

The other alternative for dynamic col_index_num is to use the INDEX MATCH MATCH formula, both return the same result.

Which one is your choice? The VLOOKUP MATCH Formula or the INDEX MATCH MATCH Formula?

Related Function

Function used in this article
  • Excel VLOOKUP Function
  • Excel INDEX Function
  • Excel MATCH Function
Usefull links
  • Look up values with VLOOKUP, INDEX, or MATCH
Share
Tweet
Google+
Email
Prev Article
Next Article

Related Articles

How to Do Division in Excel
How to divide in Excel? For example, there is data …

How to Do Division in Excel

VLOOKUP Error
The Wrong Cell Reference The wrong cell reference is the …

VLOOKUP Error – Frequently Error and Solution

VLOOKUP REF Error
VLOOKUP REF Error because one or more table_array column is …

VLOOKUP REF Error – Causes and Solutions

How to Do Multiplication in Excel
For example, there is data like the picture below, four …

How to Do Multiplication in Excel

How to Create a Formula in Excel
How to Create a Simple Formula in Excel To create …

How to Create a Formula in Excel

Tags:Excel VLOOKUP MATCH INDEX Function MATCH Function VLOOKUP Function

Categories

  • Excel 101
  • Excel Formula
  • Excel Functions

Recent Posts

  • Get the Original Price from Percentage Increase/Decrease
  • How to Add/Subtract Percentage in Excel
  • How to Extract Day, Month and Year from Date in Excel
  • How to Add Seconds, Minutes and Hours to a Time in Excel
  • How to Add Days, Weeks, Months and Years to a Date in Excel
  • How to Calculate Time Difference in Excel
  • Calculate Number of Days, Weeks, Months and Years Between Two Dates in Excel
  • Flash Fill Excel
  • Paste Special Excel
  • Excel TEXTJOIN Function
  • Excel CONCAT Function
  • Excel CONCATENATE Function
  • Excel REPLACE Function
  • Excel SUBSTITUTE Function
  • Excel REPT Function
  • Excel FIND Function
  • Excel SEARCH Function
  • Excel MID Function
  • Excel RIGHT Function
  • Excel LEFT Function

ExcelCSE.com

The Ultimate Guide How to Use Excel Better
Copyright © 2024 ExcelCSE.com
Contact Us - Privacy Policy - Sitemap | Theme by MyThemeShop.com

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh