Tidy up/reduce a formula to make it easier to maintain

beardedcraig

New Member
Joined
Aug 2, 2018
Messages
3
Hiya,

Is there anyway I could tidy up/reduce this formula to still get the same outcome? I'm basically trying to sum up all the cells across multiple columns where the criteria matches the content of two seperate cells in another worksheet.

Example: Based on the two sheets below - I wanted to sum up the total allocation percentage per role per project.
e.g. I'd like to automatically work out how many Business Analysts are allocated to Project SKY and what the total allocation percentage is across Business Analysts. The answer should be 60% in the example below.

SHEET1 - 'Raw Data':

ABCDEFG
RoleProject 1AllocationProject 2AllocationProject 3Allocation
1Project ManagerSTAR25%MOON25%SKY50%
2Business AnalystSTAR50%SKY50%N/A0%
3Business AnalystSTAR25%MOON65%SKY10%
4AdminSTAR60%MOON20%SKY20%

<tbody>
</tbody>


SHEET2 - 'Dropdowns':

AB
RolesProject Name
1Project ManagerSTAR
2Business AnalystMOON
3AdminSKY

<tbody>
</tbody>



The formula that I created (that DOES work) is: =SUMIFS('Raw Data'!C:C, 'Raw Data'!A:A, Dropdowns!A2, 'Raw Data'!B:B, Dropdowns!B3)+SUMIFS('Raw Data'!E:E, 'Raw Data'!A:A, Dropdowns!A2, 'Raw Data'!D:D, Dropdowns!B3)+SUMIFS('Raw Data'!G:G, 'Raw Data'!A:A, Dropdowns!A2, 'Raw Data'!F:F, Dropdowns!B3)

BUT - I'm looking to increase the number of Project columns from 3 to 8 so the formula will end up being HUGE. Is there a way to do this cleaner and more concisely????
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Welcome to the forum.

I had a devil of a time trying to figure out your example. The formulas and ranges did not seem to line up at all. So I took a shot and dummied up a sample like this:


ABCDEFG
1RoleProject 1AllocationProject 2AllocationProject 3Allocation
2Project ManagerSTAR25%MOON25%SKY50%
3Business AnalystSTAR50%SKY50%N/A0%
4Business AnalystSTAR25%MOON65%SKY10%
5AdminSTAR60%MOON20%SKY20%

<tbody>
</tbody>
Raw Data


And the Dropdowns sheet looks like:

ABCD
1RolesProject Name
2Project ManagerSTAR25%
3Business AnalystMOON65%
4AdminSKY20%
5Business AnalystSKY60%

<tbody>
</tbody>
Dropdowns

Array Formulas
CellFormula
C2{=SUM(IFERROR('Raw Data'!$C$2:$G$5+0,0)*('Raw Data'!$A$2:$A$5=A2)*('Raw Data'!$B$2:$F$5=B2))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>


You should just be able to change the ranges as needed. Let us know if you have questions.
 
Upvote 0
Array Formulas
CellFormula
C2{=SUM(IFERROR('Raw Data'!$C$2:$G$5+0,0)*('Raw Data'!$A$2:$A$5=A2)*('Raw Data'!$B$2:$F$5=B2))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>


You should just be able to change the ranges as needed. Let us know if you have questions.


BRILLIANT! Thank you! Thank you! Thank you!
 
Upvote 0

Forum statistics

Threads
1,215,730
Messages
6,126,529
Members
449,316
Latest member
sravya

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