INDEX, MATCH & INDIRECT- Still output comes for those horizontal & vertical ref not there in the table

IDRIS86

Board Regular
Joined
Mar 18, 2021
Messages
82
Office Version
  1. 365
Platform
  1. Windows
Hi,

There are two sheets in a single excel file. One is named worksheet & other named as value table.

In worksheet, I need the output values at G2, G3...upon the inputs C2 & D2. C2-Width & D2-Height.

C2 & D2 are referred into the Table DIBD60HA as shown below.

The issue is,

Output comes at G2, even the input sizes at C2 & D2 exceeds the maximum sizes given in the table. For example, if given inputs at width & height are 700 & 500 and no value available in the table. Because the maximum width reference in table is 600 only. The output value is 500. I'm not sure how this works. I would need to show the output to show as Not applicable or ref. It shouldn't show any values for out of table dimensions.

1617223296247.png



VALUE TABLE SHEET BELOW,

Work sheet 5.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
5SIZEWidth
6Height152178203229254279305330356381406432457483508533559584600
7309015021027033039045051057063069075081087093099010501110
850110170230290350410470530590650710770830890950101010701130
9150306090120150180210240270300330360390420450480510540570600630
102004070100130160190220250280310340370400430460490520550580610640
112505080110140170200230260290320350380410440470500530560590620650
123006090120150180210240270300330360390420450480510540570600630660
1335070100130160190220250280310340370400430460490520550580610640670
1440080110140170200230260290320350380410440470500530560590620650680
1545090120150180210240270300330360390420450480510540570600630660690
16500100130160190220250280310340370400430460490520550580610640670700
17550110140170200230260290320350380410440470500530560590620650680710
18600120150180210240270300330360390420450480510540570600630660690720
19650130160190220250280310340370400430460490520550580610640670700730
20700140170200230260290320350380410440470500530560590620650680710740
21750150180210240270300330360390420450480510540570600630660690720750
22800160190220250280310340370400430460490520550580610640670700730760
23850170200230260290320350380410440470500530560590620650680710740770
24900180210240270300330360390420450480510540570600630660690720750780
25950190220250280310340370400430460490520550580610640670700730760790
261000200230260290320350380410440470500530560590620650680710740770800
271050210240270300330360390420450480510540570600630660690720750780810
value table
Cell Formulas
RangeFormula
B10:B27B10=B9+50



WORKSHEET (SHEET NAME)

Work sheet 5.xlsx
BCDEFG
1S. NOWIDTH (MM)HEIGHT (MM)MODELTYPEVALUE
21700500 DIBD60 H 500
322031051 DIBD60 H 203
WORKSHEET
Cell Formulas
RangeFormula
G2:G3G2=(INDEX(INDIRECT(E2&F2&"A"),XMATCH(D2,INDIRECT(E2&F2&"H"),1 ),XMATCH(C2,INDIRECT(E2&F2&"W"),1 )))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G3Cell Value=0textNO
G2Cell Value=0textNO
Cells with Data Validation
CellAllowCriteria
E2:E3List=INDIRECT(#REF!)
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try Putting a 0 in b7, b8, c6 & d6
 
Upvote 0
Try Putting a 0 in b7, b8, c6 & d6
Hi, But still it shows the same values after I included 0 in those cells,


Work sheet 5.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
5SIZEWidth
6Height00152178203229254279305330356381406432457483508533559584600
70309015021027033039045051057063069075081087093099010501110
8050110170230290350410470530590650710770830890950101010701130
9150306090120150180210240270300330360390420450480510540570600630
102004070100130160190220250280310340370400430460490520550580610640
112505080110140170200230260290320350380410440470500530560590620650
123006090120150180210240270300330360390420450480510540570600630660
1335070100130160190220250280310340370400430460490520550580610640670
1440080110140170200230260290320350380410440470500530560590620650680
1545090120150180210240270300330360390420450480510540570600630660690
16500100130160190220250280310340370400430460490520550580610640670700
17550110140170200230260290320350380410440470500530560590620650680710
18600120150180210240270300330360390420450480510540570600630660690720
19650130160190220250280310340370400430460490520550580610640670700730
20700140170200230260290320350380410440470500530560590620650680710740
21750150180210240270300330360390420450480510540570600630660690720750
22800160190220250280310340370400430460490520550580610640670700730760
23850170200230260290320350380410440470500530560590620650680710740770
24900180210240270300330360390420450480510540570600630660690720750780
25950190220250280310340370400430460490520550580610640670700730760790
261000200230260290320350380410440470500530560590620650680710740770800
271050210240270300330360390420450480510540570600630660690720750780810
value table
Cell Formulas
RangeFormula
B10:B27B10=B9+50




Work sheet 5.xlsx
BCDEFG
1S. NOWIDTH (MM)HEIGHT (MM)MODELTYPEVALUE
21700500 DIBD60 H 500
322031051 DIBD60 H 203
WORKSHEET
Cell Formulas
RangeFormula
G2:G3G2=(INDEX(INDIRECT(E2&F2&"A"),XMATCH(D2,INDIRECT(E2&F2&"H"),1 ),XMATCH(C2,INDIRECT(E2&F2&"W"),1 )))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G3Cell Value=0textNO
G2Cell Value=0textNO
Cells with Data Validation
CellAllowCriteria
E2:E3List=INDIRECT(#REF!)
 
Upvote 0
What cells are your named ranges referring to?
 
Upvote 0
In that case you will need to put a 0 in B6 as well.
 
Upvote 0
In that case you will need to put a 0 in B6 as well.
Hi, It works if I fill with 0 at B6 also.

Can you help with the another schedule, where my inputs at width & height are 3300 & 500. Width 3300 is not available in table range. But it shows 584. I'm not sure how it shows this value. I would need either 0 or N/a to be outcome.

Work sheet 6.xlsx
BCDEFG
1S. NOWIDTH (MM)HEIGHT (MM)MODELTYPEVALUE
213300500 FSD36 V 584
WORKSHEET
Cell Formulas
RangeFormula
G2G2=(INDEX(INDIRECT(E2&F2&"A"),XMATCH(D2,INDIRECT(E2&F2&"H"),1 ),XMATCH(C2,INDIRECT(E2&F2&"W"),1 )))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G2Cell Value=0textNO
Cells with Data Validation
CellAllowCriteria
F2List=IF(NOT(ISERROR(MATCH(#REF!,List!$B$19:$B$21,0))),List!$J$19:$J$20,List!$J$21)




Work sheet 6.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZ
22WIDTH
23SIZE20325430535640645750855961066071176281386491495028502900295030003050310031503200
24HEIGHT17820406080100120140160180200220240260280300320340360380400420440460480
2527930507090110130150170190210230250270290310330350370390410430450470490
26381406080100120140160180200220240260280300320340360380400420440460480500
27483507090110130150170190210230250270290310330350370390410430450470490510
285846080100120140160180200220240260280300320340360380400420440460480500520
296867090110130150170190210230250270290310330350370390410430450470490510530
3078780100120140160180200220240260280300320340360380400420440460480500520540
3188990110130150170190210230250270290310330350370390410430450470490510530550
32991100120140160180200220240260280300320340360380400420440460480500520540560
332550110130150170190210230250270290310330350370390410430450470490510530550570
342600120140160180200220240260280300320340360380400420440460480500520540560580
352650130150170190210230250270290310330350370390410430450470490510530550570590
362700140160180200220240260280300320340360380400420440460480500520540560580600
372750150170190210230250270290310330350370390410430450470490510530550570590610
382800160180200220240260280300320340360380400420440460480500520540560580600620
392850170190210230250270290310330350370390410430450470490510530550570590610630
402900180200220240260280300320340360380400420440460480500520540560580600620640
412950190210230250270290310330350370390410430450470490510530550570590610630650
423000200220240260280300320340360380400420440460480500520540560580600620640660
433050210230250270290310330350370390410430450470490510530550570590610630650670
443099220240260280300320340360380400420440460480500520540560580600620640660680
VALUES
Cell Formulas
RangeFormula
D24:Z44D24=C24+20
C25:C44C25=C24+10
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E26:Z44Cell Value=0textNO
E24:Z25Cell Value=0textNO
D26:D44Cell Value=0textNO
C26:C44Cell Value=0textNO
C24:D25Cell Value=0textNO
 
Upvote 0
Try putting a 0 in B23 in place of Size
 
Upvote 0
Solution
Its because of the way you have the tables laid out.
For your original data the ranges should really be
DIBD60HA C7:W27
DIBD60HH B7:B27
DIBD60HW C6:W6
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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