Dec 22 2020 09:20 PM - edited Dec 22 2020 10:00 PM
Hi,
I seem to have an issue with a long IF formula I am trying to build. The formula itself works, but I think there could be a quicker and more clever way to achieve the same outcome. I'd like your help.
Context:
See file attached. I have created long and manual IF functions in CELLS B16-B20 (B21 is separate), but I would like to understand if there is a better way to do that. Besides, my formulas in CELLS B16-B20 does not take into account all possible scenarios because it'd be way too long. I am sure there should be another way but I can't think of it... I tried using IFS to make it shorter, but I don't have that function on MS Excel 2016.
The inputs are on B9 an B11. And the outputs are in B13, B16-B20, B21.
Any suggestion/help? I am tagging you again @Riny_van_Eekelen just in case you may be able to kindly help here.
Thank you very much,
Luca
Dec 22 2020 09:48 PM
Solution@Luca_Morrone91 This is typically something that you can handle with INDEX and MATCH. See attached. Have used some named ranges to avoid long/and absolute references in the formula. And by the way, I changed the headers on row 1 to numbers 1 through 26 in stead of 1st, 2nd, 3rd etc.
=INDEX(Quantities,MATCH(A16,ProdDescr,0),MATCH($B$13,NbrOfOrders,0))-INDEX(Quantities,MATCH(A16,ProdDescr,0),MATCH($B$9,NbrOfOrders,0))
Dec 22 2020 10:07 PM
Dec 22 2020 09:48 PM
Solution@Luca_Morrone91 This is typically something that you can handle with INDEX and MATCH. See attached. Have used some named ranges to avoid long/and absolute references in the formula. And by the way, I changed the headers on row 1 to numbers 1 through 26 in stead of 1st, 2nd, 3rd etc.
=INDEX(Quantities,MATCH(A16,ProdDescr,0),MATCH($B$13,NbrOfOrders,0))-INDEX(Quantities,MATCH(A16,ProdDescr,0),MATCH($B$9,NbrOfOrders,0))