Formula Assistance

Arts

Well-known Member
Joined
Sep 28, 2007
Messages
782
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi all

I did an Index match formula which for all intents and purposes works. INDEX(G16:P25,MATCH(T17,F16:F25,FALSE),MATCH(S17,G15:P15,FALSE))
I look up an individuals name across data (sample copied in below)

[TABLE="width: 306"]
<colgroup><col><col span="3"></colgroup><tbody>[TR]
[TD]Area[/TD]
[TD]Aaron[/TD]
[TD]Louise[/TD]
[TD]Mario[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Egypt[/TD]
[TD][/TD]
[TD="align: right"]5.95[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Holland[/TD]
[TD="align: right"]4.95[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


The initial issue I had which I managed to solve was if I was to type in the name "Louise" against "Egypt" this would return me 0. So I tailored the formula as

=IF(INDEX(G16:P25,MATCH(T17,F16:F25,FALSE),MATCH(S17,G15:P15,FALSE))=0,"No Value",INDEX(G16:P25,MATCH(T17,F16:F25,FALSE),MATCH(S17,G15:P15,FALSE)))

Is there a way I can include an ISNA aspect within the formula as well? So if I was to type in "Harry" against "Egypt" where a "N/A" is thrown up instead of a zero this can be caught as well?

Thanks
Arts
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
After mixing up the order I came up with the following formula (By having the ISNA first, I was attempting to place this within the second if at first) which seems to work. Not the most efficient of formulas so if there is a more efficient way please post otherwise the below seems to work for me

=IF(ISNA(INDEX(G16:P25,MATCH(T17,F16:F25,FALSE),MATCH(S17,G15:P15,FALSE))),"Error",IF(INDEX(G16:P25,MATCH(T17,F16:F25,FALSE),MATCH(S17,G15:P15,FALSE))=0,"No Value",INDEX(G16:P25,MATCH(T17,F16:F25,FALSE),MATCH(S17,G15:P15,FALSE))))
 
Upvote 0

Forum statistics

Threads
1,224,783
Messages
6,180,938
Members
453,007
Latest member
anaysha1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top