Matching Formula has me Stumped!

Restyl

New Member
Joined
Feb 2, 2016
Messages
16
I've been working on this one for a bit with no success. I've outlined what I'm trying to accomplish below:
3GmMnOf.png

Currently, the return works very well, but only with exact matches, everything else throws me an ERROR. I tried modifying the match_type which causes me to throw an error for some reason. What am I doing wrong?

Here is my current formula:
Code:
=IF(ISBLANK('Quoting Form'!$F$8), "???", IFERROR(INDEX('Motor Data'!$S$10:$S$15,MATCH('Quoting Form'!$D$8,INDEX('Motor Data'!$T$10:$X$15,,MATCH('Quoting Form'!$D$4,'Motor Data'!$T$9:$X$9,0)),0)),"ERROR"))
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi Changing the outer Match to Greater than instead of exact match should work:

Code:
=IF(ISBLANK('Quoting Form'!$F$8), "???", IFERROR(INDEX('Motor Data'!$S$10:$S$15,MATCH('Quoting Form'!$D$8,INDEX('Motor Data'!$T$10:$X$15,,MATCH('Quoting Form'!$D$4,'Motor Data'!$T$9:$X$9,0)),-1)),"ERROR"))

I tried replicating the same it worked for me:

ABCDEFGHIJK
ContractorVoltageHP
A
B
C
DFormula
EC
F

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]120[/TD]
[TD="align: right"]208[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]240[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]135[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]480[/TD]
[TD="align: right"][/TD]
[TD="align: right"]11[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]90[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]45[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]27[/TD]
[TD="align: right"]7.5[/TD]
[TD="align: right"]7.5[/TD]
[TD="align: right"]7.5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]18[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]9[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet2

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]I6[/TH]
[TD="align: left"]=INDEX($A$1:$A$7,MATCH(K2,INDEX($A$1:$F$7,,MATCH($I$2,A1:F1,0)),-1))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Hope this helps!

I've been working on this one for a bit with no success. I've outlined what I'm trying to accomplish below:
3GmMnOf.png

Currently, the return works very well, but only with exact matches, everything else throws me an ERROR. I tried modifying the match_type which causes me to throw an error for some reason. What am I doing wrong?

Here is my current formula:
Code:
=IF(ISBLANK('Quoting Form'!$F$8), "???", IFERROR(INDEX('Motor Data'!$S$10:$S$15,MATCH('Quoting Form'!$D$8,INDEX('Motor Data'!$T$10:$X$15,,MATCH('Quoting Form'!$D$4,'Motor Data'!$T$9:$X$9,0)),0)),"ERROR"))
 
Upvote 0
Hi Changing the outer Match to Greater than instead of exact match should work:

Code:
=IF(ISBLANK('Quoting Form'!$F$8), "???", IFERROR(INDEX('Motor Data'!$S$10:$S$15,MATCH('Quoting Form'!$D$8,INDEX('Motor Data'!$T$10:$X$15,,MATCH('Quoting Form'!$D$4,'Motor Data'!$T$9:$X$9,0)),-1)),"ERROR"))

I tried replicating the same it worked for me:

ABCDEFGHIJK
ContractorVoltageHP
A
B
C
DFormula
EC
F

<tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]120[/TD]
[TD="align: right"]208[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]240[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]135[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]480[/TD]
[TD="align: right"][/TD]
[TD="align: right"]11[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]90[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]45[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]27[/TD]
[TD="align: right"]7.5[/TD]
[TD="align: right"]7.5[/TD]
[TD="align: right"]7.5[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]18[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]9[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]1.5[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet2

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]I6[/TH]
[TD="align: left"]=INDEX($A$1:$A$7,MATCH(K2,INDEX($A$1:$F$7,,MATCH($I$2,A1:F1,0)),-1))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Hope this helps!


Thanks so much for looking at this. I had tried changing the outer match to greater than and had no luck... I just found the solution after a painful amount of debugging

I was using Data Validation Lists for my search Value, HP. This was throwing an error because the number was formatted as "Text" in the Data Validation list, and formatted as a "Number" in the lookup list. Thus, error.

Sometimes its the "obvious" stuff :stickouttounge:
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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