change this array formula with an extra "IF" condition

keithmct

Active Member
Joined
Mar 9, 2007
Messages
254
Office Version
  1. 2021
Platform
  1. Windows

Excel 2016 (Windows) 32 bit
CEGIKMOQSUWYAAACAEAFAG
13windowblind typewidthdropbracketscontrolsbunchblade sizeFabricColourtrack colourrolloperationstyle no.catbase cost
14PVCvenetian1800120050newyork503279.40
15PVCvenetian1800120063newyork6363319.00
Home

I have this array formula in AE3:
=IF(E14="","",INDEX(Categories!$H$7:$K$1402,MATCH(1,(Categories!$H$7:$H$1402=E14)*(Categories!$I$7:$I$1402=S14),0),4))
that matches the type of blind (PVCvenetian) with a category, and goes to the price grids I have set up to get a price based on the width and height, or go to the next highest price if it cant find an exact match.
What I would like to amend in the above example, where it has newyork50 and newyork63, is to only have "newyork" but put the IF statement in there somewhere to say: IF the blind type says PVCvenetian, then look up the price grid called newyork50 by concatenating S14 + Q14.
My 4 column table on the Categories page at H7:K1402 would say:
PVCvenetian newyork blank column 3
PVCvenetian newyork blank column 63

any suggestions much appreciated
 
I want it to look at newyork in S14 AND look in Q14 for either 50 or 63. If it sees 50, then get the result (category) 3 in column 4 of the table, but if it sees newyork AND 63 then it returns category 63 in column 4 of the table.

=IF(E14="","",INDEX(Categories!$K$7:$K$1402,MATCH(1,IF(Categories!$H$7:$H$1402=E14,IF(Categories!$I$7:$I$1402=S14&Q14,1)),0)))
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
nearly there.
that only works if E14 = PVCvenetian. As mentioned before, sometimes the blind type in E14 is Vertical or Holland or Roman or Panelglide or curtain.
If these other options are chosen, I don't want the S14&Q14 bit, I just want it to have S14, therefore I need the part "if E14 = PVCvenetian, then concatenate S14&Q14, but if not then only have S14"
 
Upvote 0
I have come up with this but it is really long
=IF(E16="PVCvenetian",INDEX(Categories!$K$7:$K$1402,MATCH(1,IF(Categories!$H$7:$H$1402=E16,IF(Categories!$I$7:$I$1402=S16&Q16,1)),0)),INDEX(Categories!$K$7:$K$1402,MATCH(1,IF(Categories!$H$7:$H$1402=E16,IF(Categories!$I$7:$I$1402=S16,1)),0)))
any way to shorten it?
 
Upvote 0
nearly there.
that only works if E14 = PVCvenetian. As mentioned before, sometimes the blind type in E14 is Vertical or Holland or Roman or Panelglide or curtain.
If these other options are chosen, I don't want the S14&Q14 bit, I just want it to have S14, therefore I need the part "if E14 = PVCvenetian, then concatenate S14&Q14, but if not then only have S14"

Either...

=IF(E14="","",INDEX(Categories!$K$7:$K$1402,MATCH(1,IF(Categories!$H$7:$H$1402=E14,IF(Categories!$I$7:$I$1402=IF(E14="PVCvenetian",S14&Q14,S14),1)),0)))

Or...

=IF(E14="","",INDEX(Categories!$K$7:$K$1402,MATCH(1,IF(Categories!$H$7:$H$1402=E14,IF(ISNUMBER(SEARCH(E14="PVCvenetian",S14&Q14,S14),Categories!$I$7:$I$1402)),1)),0)))

 
Upvote 0
the first one works perfectly, so I'm going with that. thank you for all your efforts. A+
For your information, the second one doesn't work. It says "you have entered too many arguments" and highlights the $I$1402 part.
 
Upvote 0
the first one works perfectly, so I'm going with that. thank you for all your efforts. A+
For your information, the second one doesn't work. It says "you have entered too many arguments" and highlights the $I$1402 part.

Second edited, control+shift+enter:

=IF(E14="","",INDEX(Categories!$K$7:$K$1402,MATCH(1,IF(Categories!$H$7:$H$1402=E14,IF(ISNUMBER(SEARCH(IF(E14="PVCvenetian",S14&Q14,S14),Categories!$I$7:$I$1402)),1)),0)))
 
Upvote 0

Forum statistics

Threads
1,215,516
Messages
6,125,284
Members
449,218
Latest member
Excel Master

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