Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Default Index Match function for lookup HELP

I have two worksheets where I am wanting to match data on tab 1 to data on tab two and return the intersecting value. I am using the formula below and keep returning the value of 0?

=IF(ISERROR(INDEX(Citrus!$A$1:$I$539,MATCH(A5,Citr us!$A$1:$H$296,0),MATCH($D$1,Citrus!$A$1:$Z$1,0))) ,0,INDEX(Citrus!$A$1:$I$539,MATCH(A5,Citrus!$A$1:$ A$296,0),MATCH($D$1,Citrus!$A$1:$Z$1,0)))

What am I doing wrong?
Attached Files
File Type: zip example.zip (52.7 KB, 67 views)
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Skye1973 View Post
I have two worksheets where I am wanting to match data on tab 1 to data on tab two and return the intersecting value. I am using the formula below and keep returning the value of 0?

=IF(ISERROR(INDEX(Citrus!$A$1:$I$539,MATCH(A5,Citr us!$A$1:$H$296,0),MATCH($D$1,Citrus!$A$1:$Z$1,0))) ,0,INDEX(Citrus!$A$1:$I$539,MATCH(A5,Citrus!$A$1:$ A$296,0),MATCH($D$1,Citrus!$A$1:$Z$1,0)))

What am I doing wrong?
Hi,

Try the below formula in cell F5 and copy down:

=INDEX(Citrus!$A$1:$G$56,MATCH($A5,Citrus!$A$1:$A$ 56,0),MATCH(D$1,Citrus!$A$1:$G$1,0))

Does that do what you need?
  #3   Report Post  
Junior Member
 
Posts: 3
Thumbs up

Quote:
Originally Posted by Spencer101 View Post
Hi,

Try the below formula in cell F5 and copy down:

=INDEX(Citrus!$A$1:$G$56,MATCH($A5,Citrus!$A$1:$A$ 56,0),MATCH(D$1,Citrus!$A$1:$G$1,0))

Does that do what you need?
THANK YOU!!! This seems to do exactly what I need I just need to add the iserror portion. This is the first time I have gotten this index/match to work correctly.

Any thoughts based on my original formula where my logic is off?
  #4   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Skye1973 View Post
THANK YOU!!! This seems to do exactly what I need I just need to add the iserror portion. This is the first time I have gotten this index/match to work correctly.

Any thoughts based on my original formula where my logic is off?

Your original formula was looking at differing range sizes. So in the one instance you're looking at a range down to row 539 and then only down to 296. It's far easier to keep an eye on where these things could be going wrong if your range sizes match.

Also in the first MATCH you are looking at multiple columns where you should be looking at only one column.

Have a read of http://www.contextures.com/xlFunctions03.html . It gives lots of clear information on how to use INDEX & MATCH.

Having had a look again at your formula I an confused as to why you're using the IF(ISERROR approach. Are you just using this to produce a zero if no match is found?

I presume from the number of rows in your example workbook (1million+) that you're using Excel 2007 or later?
If this is the case then you can use =IFERROR() rather than an IF and ISERROR then doubling up the formula. So the formula in F5 and copied down would be:

=IFERROR(INDEX(Citrus!$A$1:$G$56,MATCH($A5,Citrus! $A$1:$A$56,0),MATCH(D$1,Citrus!$A$1:$G$1,0)),0)

Hope that helps. :)
  #5   Report Post  
Junior Member
 
Posts: 3
Smile

Quote:
Originally Posted by Spencer101 View Post
Have a read of http://www.contextures.com/xlFunctions03.html . It gives lots of clear information on how to use INDEX & MATCH.
I will be checking that out!

Quote:
Originally Posted by Spencer101 View Post
Having had a look again at your formula I an confused as to why you're using the IF(ISERROR approach. Are you just using this to produce a zero if no match is found?
Yes the in the real workbook I will return several no match's that need to reflect a 0 vs an error.

Quote:
Originally Posted by Spencer101 View Post
I presume from the number of rows in your example workbook (1million+) that you're using Excel 2007 or later?
If this is the case then you can use =IFERROR() rather than an IF and ISERROR then doubling up the formula. So the formula in F5 and copied down would be:
Yes we just upgraded from 2003 to 2010 and I am still getting used to the expanded functionality and new functions. Thanks for the tip on IFERROR the formula works perfectly!

Your post has been EXTREMLEY helpful in furthering my understanding of this combination of functions. Thanks so much!


  #6   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Skye1973 View Post
I will be checking that out!



Yes the in the real workbook I will return several no match's that need to reflect a 0 vs an error.



Yes we just upgraded from 2003 to 2010 and I am still getting used to the expanded functionality and new functions. Thanks for the tip on IFERROR the formula works perfectly!

Your post has been EXTREMLEY helpful in furthering my understanding of this combination of functions. Thanks so much!

Not a problem. Always happy to help. :)
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default Index Match function for lookup HELP

"Skye1973" wrote:
Spencer101;1605315 Wrote:
Try the below formula in cell F5 and copy down:
=INDEX(Citrus!$A$1:$G$56,MATCH($A5,Citrus!$A$1:$A$ 56,0),
MATCH(D$1,Citrus!$A$1:$G$1,0))

[....]
Any thoughts based on my original formula where my logic is off?


I believe I answered that already. As I noted, you have a typo in the
ISERROR expression.

When I fix that, your original formula seems to work the same as Spencer's
rewrite without the loss of functionality (error detection).

Granted, you do not seem to need the error detection, at least with the
example Excel file. And granted, Spencer's rewrite simplifies your original
formula in ways that are consistent with the example Excel file.

But we cannot know if the example Excel file is representative of your total
and future needs. Only you can make that determination.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default Index Match function for lookup HELP

"Skye1973" wrote:
I have two worksheets where I am wanting to match data
on tab 1 to data on tab two and return the intersecting
value. I am using the formula below and keep returning
the value of 0?

=IF(ISERROR(INDEX(Citrus!$A$1:$I$539,MATCH(A5,Citr us!$A$1:$H$296,0),
MATCH($D$1,Citrus!$A$1:$Z$1,0))),0,INDEX(Citrus!$A $1:$I$539,
MATCH(A5,Citrus!$A$1:$A$296,0),MATCH($D$1,Citrus!$ A$1:$Z$1,0)))

What am I doing wrong?


For one thing, the range Citrus!$A$1:$H$296 in the ISERROR should be
Citrus!$A$1:$A$296, as it is in the value-if-true expression.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
reverse lookup function, index/match usage? Ambie Excel Worksheet Functions 3 December 12th 08 02:22 AM
Lookup / Index / Match Function [email protected] Excel Discussion (Misc queries) 0 July 10th 07 06:23 PM
Lookup/Index/Match HELP! Ellen G. Excel Discussion (Misc queries) 1 February 13th 06 03:15 PM
index / match /lookup ? help andrewm Excel Worksheet Functions 8 July 21st 05 02:55 PM
lookup (v,h,index,match) briank Excel Worksheet Functions 1 February 9th 05 02:05 AM


All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"