Index Match with multiple conditions combined with an IF statement

MarkR3003

New Member
Joined
Aug 11, 2019
Messages
25
I have a workbook that contains three validation cells, 'Brand'; which has two values, 'Customer' and 'Product', both which have multiple values. Two seperate datasheets (tabs) for each 'Brand' contain the 'lookup' data, both containing columns for 'Customer', 'Product' and 'Discount'

Im trying to get the formula below to return the 'Discount' value from the appropriate 'Brand' tab when the selected 'Brand',
'Customer' and 'Product'
validation cells are matched

{=IF(B8="Brand_A",(INDEX('Discount_1'!P:P,MATCH($G$3&V8,'Discount_1'!A:A&'Discount_1'!C:C,0),IF(B8="Brand_B",(INDEX('Discount_2'!O:O,MATCH($G$3&D8,'
Discount_2
'!A:A&'
Discount_2
'!B:B,0)))))))}

B8 = Validation cell containing either "Brand_A" or "Brand_B"
$G$3 = Validation cell containing "Customer" list
V8 = "Brand_A" product
D8 = "Brand_B" product
Discount_1 = Tab containing huge data table for "Brand_A" with Column A (Customer) and Column C (Product)
Discount_2 = Tab containing huge data table for "Brand_B" with Column A (Customer) and Column B (Product)
Discount_1
P:P = Column containing the discount value to be returned
Discount_2 O:O =
Column containing the discount value to be returned

I have made the formula into an array which returns the correct discount value when "Brand_A" is selected in B8, but only returns "FALSE" when "Brand_B" is selected in B8

Grateful if you could advise what I am doing wrong?

Many thanks
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi & welcome to MrExcel.
Try
=IF(B8="Brand_A",INDEX('Discount_1'!P:P,MATCH($G$3&V8,'Discount_1'!A:A&'Discount_1'!C:C,0)),IF(B8="Brand_B",INDEX('Discount_2'!O:O,MATCH($G$3&D8,'Discount_2'!A:A&'Discount_2'!B:B,0))))
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
I am using this formula IFERROR(IF(INDEX(E3:E7,MATCH(H3,D3:D7,0))="Unscheduled", "",INDEX(E3:E7,MATCH(H3,D3:D7,0))),"") and I want to an another condition to handle if the reference cell is blank.

But cant get it to work with first condition "Unscheduled". Is there a way to add IFERROR(IF(INDEX(E3:E7,MATCH(H3,D3:D7,0))=0,"", to IFERROR(IF(INDEX(E3:E7,MATCH(H3,D3:D7,0))="Unscheduled", "",INDEX(E3:E7,MATCH(H3,D3:D7,0))),"").


IDScheduleExpected result
119.16.019.16.0
2Unscheduled-
319.16.219.16.2
4-
519.16.319.16.3

<tbody>
</tbody>

Any help would be appreciated
 
Upvote 0
How about
=IFERROR(IF(OR(INDEX(E3:E7,MATCH(H3,D3:D7,0))={"Unscheduled",0}), "",INDEX(E3:E7,MATCH(H3,D3:D7,0))),"")
 
Upvote 0
My pleasure & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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