You are on page 1of 5

Home Learn Tips VBA

Home / Excel Tips / Why INDEX-MATCH Is Far Better Than VLOOKUP or HLOOKUP in Excel
Find Us Here


Raghu R Excel Tips

Why INDEX-MATCH Is Far Better Than


VLOOKUP or HLOOKUP in Excel

Share 21K Like 21K Share Tweet 9 6

ExcelsVLOOKUPfunctionismorepopularandwidlyusedthanthe
INDEXMATCHfunction.Whenyouwanttolookupdatainaspreadsheet,
youshouldbeusingINDEXMATCHcontrarytoLOOKUPfunctions.Heres
why

Popular Posts
1.INDEXMATCHisprettyflexiblethanExcelslookupfunctions.

How to Unprotect an Excel Sheet


2.Atitsbest,INDEXMATCHismanytimesfaster
Without Password

Ibelieve,oneshouldeveruseLOOKUPfunctionsisyoumightnotknow Learn to use Vlookup in Excel


howtouseINDEXMATCHoryoumightbeworkingwithbeginnersor
fresherswhosortofunderstandVLOOKUPbutwhoknownothingabout
Learn to Compose and send
INDEXMATCH.Ifthatstheproblem,Ihopethispostwillhelp. emails from Excel using VBA

10 Top Excel Keyboard Shortcuts

Advanced PivotTables:
Combining Data from Multiple
Sheets

How to convert Numbers to


Words in Indian Currency Format
VBA Macros

Recent Posts

How to Get Live Data From A


Web Page Direct Into Excel

How To Find Merged Cells In


Excel

How to Crack Locked Microsoft


VLOOKUPisapowerfulandmuchusedExcelfunction.Ifyourenot Word Files

familiar,itfindsalookupvalueinatableandreturnsthecorresponding
Excel VBA: Different Types Of
valueofanothercolumn.Thisisgreatforlookingupinformationby Excel Macros
reference.Intheexampleimageabove,Nameisthelookupvalue,andit
returnsthematchingSalary.IfyouareapowerExceluser,youarelikely Excel VBA Tip: Remove Blank
Lines From A Text File with
veryfamiliarwiththisfunction.Ifnot,hereshowitworks: Condition

=VLOOKUP(Lookup_value,Table_array,Col_index_num, Excel Function: MATCH()


Explained
Range_lookup))
Lookup_valueThevalueyouwanttofindinthelookup
valuecolumn Categories
Lookup_valueThetablerangecontainingcolumnsforboth
Advanced Excel Tips
thelookupandreturnvalues
Col_index_numTheindexnumberforthecolumn Excel News
containingthereturnvalues
Excel Shortcuts
Range_lookupThetypeofmatch:NearestLessThan
(TRUE),orExact(FALSE)[optional] Excel Tips

Games
VLOOKUP,thoughpowerfulanduseful,isnotwithoutitslimitations.In
fact,itcanbedangerousbecauseofsomeunexpectedeffectsandbehaviors. Interview Tips
IfyouuseVLOOKUP,pleasereadontolearnabouttheseissues.This
Learn Excel
equallyappliestoVLOOKUPssisterfunctionHLOOKUP(whichdoes
horizontallookupsinsteadofverticallookups)andanothersimilarfunction, VBA Tips
LOOKUP.Ihaveprovidedasaferandmoreflexiblealternativelookup
method,whichIusevirtuallyeverywhereinplaceofVLOOKUP.

First,IllexplainsomeofVLOOKUPslimitations:

1.Yourdatarangeislimitedtoatable.Thatmeansthedatayouare
lookinguphastobeinastandardtabularform.Youcannotuse
VLOOKUPtofindalookupvalueinadifferenttable,sheet,oroffset
row.Thislimitsthewaysyoucandisplayyourdata,asanythingyou
wanttolookupmustbeavailableinastandardtableformatinyour
spreadsheet.
2.VLOOKUPalwayssearchestheleftmostcolumnofthespecifiedtable
tofindthelookupvalue.Again,thislimitsyourchoicesinpresenting
dataaslookupvaluesalwayshavetobetotheleftofthereturnvalues.
Thissometimesmeansyoumusthavemultiplecopiesoftablesin
order,thinkfaraheadwhencreatingtablesthatmightbeusedin
lookup,orreordercolumnsafterthefactsimplytouseVLOOKUP.
3.Youcanonlyspecifythereturnvaluecolumnbyindexnumber.This
meansthereisnowaytoincludeastaticreferencetothereturnvalue
column.Ifsomeoneaddsacolumnbetweenthelookupvaluecolumn
andreturnvaluecolumn,itwillbreakyourVLOOKUPandyouhaveto
manuallyincreasethecolumnindexnumberintheformulas.Thisisa
maintenancenightmare.
4.VLOOKUPprovidesaverylimitedapproximatematchfeature.The
onlyaproximatematchoptionfindsthenearestlessthanvalue.
Unlessyouwantthattypeofbehavior,youreoutofluckandcantuse
it.

Now,herearesomedangersofVLOOKUP:

1.Bydefault,VLOOKUPusesapproximatematch.Ifthisishowyou
wantittofunction,thengreatHowever,inmanycasesyouwantan
exactvaluereturned.Itgivesnoindicationitispickingaclosestmatch
result.Ifyoudonotwantthisbehavior(whichismostofthetime,I
havefound),youremembertoexplicitlysettheRange_lookup
argumentintheformulatoFALSE.Range_lookupisoptional,andnot
averydescrivenameofthisfeature,soitisoftenoverlooked.This
quirkisexasperatedbytheseconddanger
2.VLOOKUPcanprovidefalseresultsifthetableisnotsortedin
ascendingorder!Thisisanissuewhenyouusetheapproximate
matchfeature,whichisTRUEbydefault.Basically,VLOOKUPstarts
atthetopofthetableandgoesdownrowbyrowuntiltogetstoavalie
lessthanorequaltothelookupvalue.Ifyourtableisnotsortedin
ascendingorder,thiscangivefalseresults,astheformulastops
processingrowsimmediatelyafterfindingamatch.

Sufficientlyscared?Checkingyourspreadsheetsforissuesnow??The
answertotheseproblemsandlimitationsistheINDEXMATCHlookup
method.Thismethodsusestwofunctionstogethertoprovideamoresafe
andflexiblelookupfeature.Hereshoweachfunctionworks,independently:

INDEXreturnsthevalueattheintersectionofarowandcolumnina
givenrange.
Formula:=INDEX(Array,Row_num,Column_num)
ArrayTherangeofcells
Row_numTherowtoreturndatafrom
Column_numThecolumntoreturnthedatafrom
[optional]
MATCHreturnsapositionofaniteminanarraythatmatchesavalue.
Formula:=MATCH(Lookup_value,Lookup_array,
Match_type)
Lookup_valueThevalueyouwanttofindinthe
lookupvaluearray
Lookup_arrayTherangecontaininglookupvalues
Match_typeExact(0),NearestLessThan(1),or
NearestGreaterThan(1)[optional]

Combiningthetwofunctions,youareabletoeffectivelybeatthelimitations
anddangersofVLOOKUP.Youcanbuildalookupthatallowsyoutospecify
thelookupcolumnandreturnvaluecolumncompletelyindependently,and
alsocontrolofthenatureoftheapproximatematch,ifnotexact.Thearrays
arerangesandyoucanspecificColumn_numinplaceofRow_num,which
meanyouarenotlimitedtousingcolumnsonlythiscanbeusedinplaceof
HLOOKUP.Itstillhastheapproximatematchfeatureasnearestlessthan
bydefault,andcarriesthesamesortwarningsasVLOOKUP.Hereshow
thecombinedfunctionworks:

=INDEX(Return_value_range,MATCH(Lookup_value,
Lookup_value_range,Match_type))
Return_value_rangeTherangethatholdsthereturn
values
Lookup_valueThevalueyouwanttofindinthelookup
valuearray
Lookup_value_rangeTherangecontaininglookupvalues
Match_typeExact(0),NearestGreaterThan(1),orNearest
LessThan(1)

Enjoy,anduseingoodhealth!

ExampleofaINDEXMATCHformulaexposedinanExcel
SpreadsheetVlookup_Index_Match.xls

Courtesy:thinketg.com

Share this:

Facebook 10K+ Twitter Google LinkedIn 51 Pinterest 6

Related

HowtoDecideWhichExcel HowtoUseINDEXMATCH TroubleshootVLOOKUP()


LookupFormulatoUse November7,2014 FormulaTheCommon
November10,2014 In"LearnExcel" Mistakes
In"ExcelTips" July18,2014
In"ExcelTips"

Adsby Google ExcelforBeginners Vlookup FuzzyMatchExcel

Adsby Google ExcelTutorial VlookupwithExample ExcelSheet

Raghu R
ExcelismyPassionandVBALoveofLife.Iliketosolveand
automateanypossibleopportunityinExcelincludingincombination
withOfficeApplications(Access,Outlook,Word,PowerPoint,Visio,
etc)andotherNonOfficeApplications(SAP,IE,Batch,
ConfigurationManagementTools,etc).Note:Allthesolutionsgiven
herearepublishedafterthoroughlytestedtomyknowledge,however
itisadvisedtokeepacopybeforeyoutryit.

You might also like


Simple Excel Tips and Tricks Remove Extra Spaces
Between Data in Excel

2 Responses

Showallresponses
Home / Excel Tips / Advanced PivotTables: Combining Data from Multiple Sheets
Find Us Here


Raghu R Excel Tips Learn Excel

Advanced PivotTables: Combining Data from


Multiple Sheets

Share Tweet 9 9

WhenyouwanttocreateaPivotTable,whatdoyoudoifyouhavedatain
differentworksheets?IfyoureusingExcel2013,youhaveastreamlined
methodofdoingthis.TheresatechniquecalledtheDataModel,andituses
datarelationshipsthewayadatabasedoes.

Popular Posts
Inthistutorial,IllshowyoueverythingyouneedtomakeaPivotTablein
Excel2013fromdatainmultiplesheets,usingtheDataModel.
How to Unprotect an Excel Sheet
Without Password
Examining the Data
Learn to use Vlookup in Excel
Thisworkbookhasthreeworksheets:CustomerInfo,OrderInfo,and
PaymentInfo.
Learn to Compose and send
emails from Excel using VBA
ClicktheCustomerInfosheet,andseethatitcontainsordernumbersand
thenameandstateofcustomers. 10 Top Excel Keyboard Shortcuts

Advanced PivotTables:
Combining Data from Multiple
Sheets

How to convert Numbers to


Words in Indian Currency Format
VBA Macros

Recent Posts

How to Get Live Data From A


Web Page Direct Into Excel

How To Find Merged Cells In


Excel
CustomerInfosheet
How to Crack Locked Microsoft
ClicktheOrderInfosheet,andseethatitalsocontainsordernumbers,as Word Files

wellasfieldsforthemonth,theproductsordered,andwhetherornotthe
Excel VBA: Different Types Of
productsareorganic. Excel Macros

Excel VBA Tip: Remove Blank


Lines From A Text File with
Condition

Excel Function: MATCH()


Explained

You might also like