Array sumif - need an assistance

Myrko

Board Regular
Joined
Jan 26, 2015
Messages
77
Hi,

I have two spreadsheets, each containing two columns - ID and Profit (Sheet1), the other one contains ID and Sector(Sheet2).

I am building third sheet which will contain calculation. Let's say I'll put a drop down menu in A1 which will allow user to choose Sector. Then, I want in A2 a formula which would sum all profits from sheet1 - for all IDs which meet Sector criteria.

Any thoughts? I prefer solving it without importing Sector data to the second sheet and then doing simple sumif.

I have tried with an array function (descriptive form of function, not using valid references as I am in a kind of a rush):
{=sumif(Sheet1!A:A,if(Sheet2!B:B=A1,Sheet2!A:A),Sheet1!B:B)}

But it didn't seem like it worked :)

Thanks in advance :)
 
Marvelous!

I've forgotten that I have to do averages too...

I have tried to modify Sum of profits of the companies which meet sector criteria but numbers are not right again...

I was able to put together SUM and COUNT (SUM/COUNT) to get it to work but I am not sure if it's most efficient way (I want to make it runs as fast as possible).

Is there simple way to transform D2 (sum of profits that meet criteria SECTOR) and D4 (sum of profits that meet criteria SECTOR, and profit range) formulas to show averages with the same criteria or do you think it would be similar to the sum/count in terms of efficiency?

Thanks for the 1000th time :)
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Yes, you just need to create SUM/COUNT formulas for D2 and D4. There really isn't any other way to get an accurate average. Both of those formulas are easy to convert to a COUNT formula (for the SUMPRODUCT, just remove the last range, for the other change the SUMIFS to a COUNTIFS). Let me know if you need help with that.

Glad to help! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

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