IF Syntax in MATCH INDEX Formula?

agerrard

Active Member
Joined
Apr 4, 2005
Messages
406
Hi All,

Im using MS Excel 2007.

Just have a question about the correct syntax in a formula with MATCH INDEX. I'm sure its simple but i keep getting stuck.

My example is below:


Excel 2007
ABCDEFGHIJ
2Discount or OfferDiscount or OfferSuggested Promo Sell $Suggested Promo Sell $
329/06/20156/07/201529/06/20156/07/2015
4RefDescriptionSub CategoryRRPCostMargin
577216eaProduct1CategoryA$13.47$4.5366.4%-20%-20%$ 4.00$ 4.00
6226801eaProduct2CategoryA$19.99$7.4362.8%-22% $ 4.00$ 4.00
FY 2016
Cell Formulas
RangeFormula
H3=G3+7
H5=IF(INDEX('PROMO DISCOUNT'!$E$4:$H$5,MATCH($B5,'PROMO DISCOUNT'!$D$4:$D$5,0),MATCH(H$3,'PROMO DISCOUNT'!$E$3:$H$3,0))<>0,INDEX('PROMO DISCOUNT'!$E$4:$H$5,MATCH($B5,'PROMO DISCOUNT'!$D$4:$D$5,0),MATCH(H$3,'PROMO DISCOUNT'!$E$3:$H$3,0)),"")
H6=IF(INDEX('PROMO DISCOUNT'!$E$4:$H$5,MATCH($B6,'PROMO DISCOUNT'!$D$4:$D$5,0),MATCH(H$3,'PROMO DISCOUNT'!$E$3:$H$3,0))<>0,INDEX('PROMO DISCOUNT'!$E$4:$H$5,MATCH($B6,'PROMO DISCOUNT'!$D$4:$D$5,0),MATCH(H$3,'PROMO DISCOUNT'!$E$3:$H$3,0)),"")
I3=G3
I5=IF(INDEX('PROMO PRICE_RETRIEVAL'!$E$4:$H$5,MATCH($B5,'PROMO PRICE_RETRIEVAL'!$D$4:$D$5,0),MATCH(I$3,'PROMO PRICE_RETRIEVAL'!$E$3:$H$3,0))<>0,INDEX('PROMO PRICE_RETRIEVAL'!$E$4:$H$5,MATCH($B5,'PROMO PRICE_RETRIEVAL'!$D$4:$D$5,0),MATCH(I$3,'PROMO PRICE_RETRIEVAL'!$E$3:$H$3,0)),"")
I6=IF(INDEX('PROMO PRICE_RETRIEVAL'!$E$4:$H$5,MATCH($B6,'PROMO PRICE_RETRIEVAL'!$D$4:$D$5,0),MATCH(I$3,'PROMO PRICE_RETRIEVAL'!$E$3:$H$3,0))<>0,INDEX('PROMO PRICE_RETRIEVAL'!$E$4:$H$5,MATCH($B6,'PROMO PRICE_RETRIEVAL'!$D$4:$D$5,0),MATCH(I$3,'PROMO PRICE_RETRIEVAL'!$E$3:$H$3,0)),"")
J3=H3
J5=IF(INDEX('PROMO PRICE_RETRIEVAL'!$E$4:$H$5,MATCH($B5,'PROMO PRICE_RETRIEVAL'!$D$4:$D$5,0),MATCH(J$3,'PROMO PRICE_RETRIEVAL'!$E$3:$H$3,0))<>0,INDEX('PROMO PRICE_RETRIEVAL'!$E$4:$H$5,MATCH($B5,'PROMO PRICE_RETRIEVAL'!$D$4:$D$5,0),MATCH(J$3,'PROMO PRICE_RETRIEVAL'!$E$3:$H$3,0)),"")
J6=IF(INDEX('PROMO PRICE_RETRIEVAL'!$E$4:$H$5,MATCH($B6,'PROMO PRICE_RETRIEVAL'!$D$4:$D$5,0),MATCH(J$3,'PROMO PRICE_RETRIEVAL'!$E$3:$H$3,0))<>0,INDEX('PROMO PRICE_RETRIEVAL'!$E$4:$H$5,MATCH($B6,'PROMO PRICE_RETRIEVAL'!$D$4:$D$5,0),MATCH(J$3,'PROMO PRICE_RETRIEVAL'!$E$3:$H$3,0)),"")
G5=IF(INDEX('PROMO DISCOUNT'!$E$4:$H$5,MATCH($B5,'PROMO DISCOUNT'!$D$4:$D$5,0),MATCH(G$3,'PROMO DISCOUNT'!$E$3:$H$3,0))<>0,INDEX('PROMO DISCOUNT'!$E$4:$H$5,MATCH($B5,'PROMO DISCOUNT'!$D$4:$D$5,0),MATCH(G$3,'PROMO DISCOUNT'!$E$3:$H$3,0)),"")
G6=IF(INDEX('PROMO DISCOUNT'!$E$4:$H$5,MATCH($B6,'PROMO DISCOUNT'!$D$4:$D$5,0),MATCH(G$3,'PROMO DISCOUNT'!$E$3:$H$3,0))<>0,INDEX('PROMO DISCOUNT'!$E$4:$H$5,MATCH($B6,'PROMO DISCOUNT'!$D$4:$D$5,0),MATCH(G$3,'PROMO DISCOUNT'!$E$3:$H$3,0)),"")


What i'm trying to fix is in cells I5, I6, J5 and J6 (in the above table). So say for example if you look at cell J6. I want excel to look in cell H6 and if the value in H6 is a blank then i want the formula in J6 to also return a blank. Otherwise i need it to return the value that corresponds to the date and product description in the below data table:


Cell Formulas
RangeFormula
E342184
E44
E54
F342191
F44
F54
G342198
G44
G54
H342205
H44
H54
C41215BP4
C51212BP4
D4Product1
D5Product2


Hopefully this makes sense!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
It worked in my sheet using below formula:-

In Cell J6:-

=IF(H6="","",INDEX('PROMO PRICE_RETRIEVAL'!$A$1:$H$5,MATCH('FY 2016'!$C6,'PROMO PRICE_RETRIEVAL'!$D$1:$D$5,0),MATCH('FY 2016'!J$3,'PROMO PRICE_RETRIEVAL'!$A$3:$Z$3,0)))


Regards,
DILIPandey
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

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