Sumifs for non-adjacent arrays of data

i_excel

Board Regular
Joined
Jun 4, 2015
Messages
113
Hi

I'm a long time spectator, first time poster. My question has perhaps been answered elsewhere. But I've struggled to find its solution online, so any help would be much appreciated.

I'm searching for a function that operates like sumifs() for non-adjacent arrays of data that are separated by the desired condition. Take the following for example:

A B C
3 C 2
5 C 1
6 I 9

Here, the function should return a value of 11 when the condition is "C". To further clarify my question, here is the function that I hoped would work but didn't: sumifs((A1:A3,C1:C3),B1:B3,"C"). I would prefer, if it is possible, not to have to rearrange the columns of data.

Kind regards
i_excel
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Try:

Code:
=SUMPRODUCT(--(B1:B3="C"),A1:A3+C1:C3)
 
Upvote 0
AhoyNC, you are as brilliant as you are modest. Thank you for your help - it works perfectly.

i_excel
 
Upvote 0
You're welcome. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,851
Messages
6,121,931
Members
449,056
Latest member
denissimo

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