Jan 20 2022 05:16 AM
Can anyone simplify this formula in the attached excel. This is just an example but the lists are very long and I wanted to see if there was a better way of doing this. Many thanks in advance it is MUCH appreciated.
Jan 20 2022 05:25 AM
Like this:
=IF(AND(G2=$E3,ISNUMBER(MATCH(C3,$O$3:$O$12,0))),$D3,0)
You can expand the range $O$3:$O$12 as needed.
Jan 20 2022 05:26 AM
Jan 20 2022 05:44 AM
Jan 24 2022 01:48 AM
Jan 24 2022 01:48 AM
Jan 24 2022 01:49 AM
Jan 24 2022 03:30 AM
Although it is probable that you are not using 365 (or Excel 2021), you did not say, so this is a single dynamic array formula
= COUNTIFS(list,costCentre)
*(header=type)
* amount
Jan 24 2022 04:50 AM
Thank you so much for this, but can I ask you one last question. Is this the best / quickest formula to use ?
Jan 24 2022 06:07 AM
SolutionThe formula is OK. I'd use ISNUMBER and MATCH for the range L6:L7 too; that makes it easier to add Cost Centers if necessary.
So:
=ROUND(IF(AND(F$2=$D3,$E3="sz"),$C3*$J$2,IF(AND(F$2=$D3,OR(ISNUMBER(MATCH($A3,$J$7:$J$13,0)),ISNUMBER(MATCH($B3,$L$6:$L$7,0)))),$C3,0)),0)
or, slightly shorter:
=ROUND(IF(F$2=$D3,$C3*IF($E3="sz",$J$2,IF(OR(ISNUMBER(MATCH($A3,$J$7:$J$13,0)),ISNUMBER(MATCH($B3,$L$6:$L$7,0))),1,0)),0),0)
Jan 26 2022 03:57 AM
Jan 24 2022 06:07 AM
SolutionThe formula is OK. I'd use ISNUMBER and MATCH for the range L6:L7 too; that makes it easier to add Cost Centers if necessary.
So:
=ROUND(IF(AND(F$2=$D3,$E3="sz"),$C3*$J$2,IF(AND(F$2=$D3,OR(ISNUMBER(MATCH($A3,$J$7:$J$13,0)),ISNUMBER(MATCH($B3,$L$6:$L$7,0)))),$C3,0)),0)
or, slightly shorter:
=ROUND(IF(F$2=$D3,$C3*IF($E3="sz",$J$2,IF(OR(ISNUMBER(MATCH($A3,$J$7:$J$13,0)),ISNUMBER(MATCH($B3,$L$6:$L$7,0))),1,0)),0),0)