Combining two INDEX and MATCH functions

djaida

Board Regular
Joined
Apr 27, 2022
Messages
59
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
I have an INDEX MATCH combination which looks up two different named ranges (direct_orders and local_suppliers), and matches the names of the publishers / suppliers with the final prices. Would it be possible to combine these two functions so it can be applied to the entire column? Below is the table.

ORDER CALCULATIONS TEST.xlsx
ABCDEFGHIJKLMNOPQRSTUVWX
1 FOREIGN SUPPLIERS LOCAL SUPPLIERS
2 DIRECT ORDER
3YearCodeTitleMinorLecturerTextbookAuthorPublisherISBNQuantityInstructorIn stockTO ORDERCENGAGEPEARSONSUPPLIER1SUPPLIER2QUOTESupplier FinalPrice FinalAvailabilityTrackingCOSTARRIVED #
41CS121Computer Organization and ArchitectureName SurnameComputer Organization and ArchitectureMcGraw-Hill5106$ 40.00$ 50.001SUPPLIER1$ 40.00$ 240.00
51CS122Programming and Problem Solving IIName SurnameProgramming and Problem Solving IIPearson5151$ 50.000PEARSON$ 50.00$ 50.00
61CS123Discrete MathematicsName SurnameDiscrete MathematicsCENGAGE5160$ 60.000#N/A$ -$ -
71CS124Discrete MathematicsName SurnameDiscrete MathematicsCENGAGE5106$ 60.000CENGAGE$ 60.00$ 360.00
81CS124Discrete MathematicsName SurnameDiscrete MathematicsWiley5106$ 50.00$ 40.001SUPPLIER2$ 40.00$ 240.00
Sheet2
Cell Formulas
RangeFormula
J4:J8J4=IF(F4="No textbook",0,(COUNTIFS('ORDER CALCULATIONS MINOR COLUMNS.xlsx'!Table1[Major],"Computer Science",'ORDER CALCULATIONS MINOR COLUMNS.xlsx'!Table1[Minor],"-",'ORDER CALCULATIONS MINOR COLUMNS.xlsx'!Table1[Year],"1")))
K4:K8K4=IF(F4="No textbook",0,COUNTIF(E4,"<>"))
R4:R8R4=IF(AND(ISBLANK(N4), ISBLANK(O4)),1, 0)
S4,S8S4=INDEX(local_suppliers,MATCH(T4,P4:Q4,0))
T4:T8T4=IF(M4=0,0,MAX(N4:O4,MIN(P4:Q4)))
S5:S7S5=INDEX(direct_orders,MATCH(T5,N5:O5,0))
M4:M8M4=IF(J4+K4-L4<0,0,J4+K4-L4)
W4:W8W4=M4*T4
Named Ranges
NameRefers ToCells
direct_orders=Sheet2!$N$3:$O$3S5:S7
local_suppliers=Sheet2!$P$3:$Q$3S8, S4
Cells with Conditional Formatting
CellConditionCell FormatStop If True
S1:S8Cell Valuecontains "SUPPLIER2"textNO
S1:S8Cell Valuecontains "SUPPLIER1"textNO
F1:F8Cell Valuecontains "No textbook"textNO
P4:Q4Other TypeColor scaleNO
J4:J8,M4:M8,W4:W8Cell Value=0textNO
S4:S8,H4:H8Cell Valuecontains "CENGAGE"textNO
H4:H8,S4:S8Cell Valuecontains "PEARSON"textNO
A4:O6,R4:X4,A7:S8,P5:S6,T5:X8Expression=$U4="Available"textNO
A4:O4,R4:X4,A5:X8Expression=$F4:$F11=""textNO
A4:O4,R4:X4,A5:X8Expression=$U4="Temporarily unavailable"textNO
A4:O4,R4:X4,A5:X8Expression=$U4="Print on demand"textNO
A4:O4,R4:X4,A5:X8Expression=$U4="Out of print"textNO
A4:O4,R4:X4,A5:X8Expression=$V4="Ordered"textNO
A4:O4,R4:X4,A5:X8Expression=$V4="Arrived"textNO
A4:O4,R4:X4,A5:X8Expression=$V4="Incomplete"textNO
A4:O4,R4:X4,A5:X8Expression=$V4="Late"textNO
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
How about this in cell S4?:

Excel Formula:
=IFERROR(FILTER($N$3:$Q$3, ($N4:$Q4 = T4) * ($N4:$Q4 <> "")), "")
 
Upvote 0
Solution
How about this in cell S4?:

Excel Formula:
=IFERROR(FILTER($N$3:$Q$3, ($N4:$Q4 = T4) * ($N4:$Q4 <> "")), "")
Yes, this seems to work in my test workbook. I will mark the question as answered, thank you!
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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