ifna index match with if

blicop

New Member
Joined
Aug 9, 2011
Messages
18
Office Version
  1. 365
Platform
  1. Windows
DataSet:
[TABLE="width: 341"]
<tbody>[TR]
[TD][TABLE="class: grid, width: 341"]
<tbody>[TR]
[TD]Factory Code[/TD]
[TD]Min Gauge[/TD]
[TD]Max Gauge[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]CODE1[/TD]
[TD="align: right"]0.00650[/TD]
[TD="align: right"]0.00879[/TD]
[TD="align: right"]1.225[/TD]
[/TR]
[TR]
[TD]CODE2[/TD]
[TD="align: right"]0.00800[/TD]
[TD="align: right"]0.02000[/TD]
[TD="align: right"]1.215[/TD]
[/TR]
[TR]
[TD]CODE3[/TD]
[TD="align: right"]0.00300[/TD]
[TD="align: right"]0.00390[/TD]
[TD="align: right"]1.550[/TD]
[/TR]
[TR]
[TD]CODE4[/TD]
[TD="align: right"]0.00800[/TD]
[TD="align: right"]0.00879[/TD]
[TD="align: right"]1.450[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Need help with an index-match formula with an if statement that if the gauge entered below is within the min-max of the factory codes matching row above, it should return the appropriate price. Also if it does match the factory code but falls outside the range, it should return "out of range".

Sample Output:
[TABLE="class: grid, width: 287"]
<tbody>[TR]
[TD]Factory Code[/TD]
[TD]Gauge[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]CODE3[/TD]
[TD="align: right"]0.00380[/TD]
[TD="align: right"]1.550[/TD]
[/TR]
</tbody>[/TABLE]

Any help would be much appreciated
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][td]
E​
[/td][td]
F​
[/td][td]
G​
[/td][td]
H​
[/td][/tr][tr][td]
1​
[/td][td]Factory Code[/td][td]Min Gauge[/td][td]Max Gauge[/td][td]Price[/td][td][/td][td]Factory Code[/td][td]Gauge[/td][td]Price[/td][/tr]
[tr][td]
2​
[/td][td]CODE1[/td][td]
0.0065
[/td][td]
0.00879
[/td][td]
1.225
[/td][td][/td][td]CODE3[/td][td]
0.0038
[/td][td]
1.55
[/td][/tr]
[tr][td]
3​
[/td][td]CODE2[/td][td]
0.008
[/td][td]
0.02
[/td][td]
1.215
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
4​
[/td][td]CODE3[/td][td]
0.003
[/td][td]
0.0039
[/td][td]
1.55
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
5​
[/td][td]CODE4[/td][td]
0.008
[/td][td]
0.00879
[/td][td]
1.45
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


In H2 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($D$2:$D$5,MATCH($F2,IF($B$2:$B$5<=$G2,IF($C$2:$C$5>=$G2,$A$2:$A$5)),0)),"not available or out of range")
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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