SUMIF on specific cells

JimM

Well-known Member
Joined
Nov 11, 2003
Messages
741
I'm sure this should be simple but brain's not working today!

I want to add together specific individual cells based on the value in other cells eg. add together A1 + D1 + G1 but only if the cells B3, E3 and H3 have the word 'Act' in them
It's not an all or nothing position so result could be A1 + G1 if only B3 and H3 contain 'Act'

The actual formula would have to cover more than 3 cells

Hopefully that makes sense and any pointers would be appreciated
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Try

=SUMIFS($A$1:$G$1,$B$3:$H$3,"ACT")

basically just offset the Criteria Range by 1 col

1592923301320.png
 
Upvote 0
Consider:

Book1
ABCDEFGH
1123
2
3actactact
4
56
66
Sheet1
Cell Formulas
RangeFormula
A5A5=SUMIF(B3:H3,"*act*",A1:G1)
A6A6=SUMPRODUCT(A1:G1,--ISNUMBER(SEARCH("act",B3:H3)),--(MOD(COLUMN(A1:G1),3)=1))


If the cells between "act" on row three will never have "act" in them, then the A5 formula will work. If you need to ignore those cells, the A6 formula will work. Both these formulas assume a constant distance between cells. If you have differing offsets, there are more complicated ways to do it.
 
Upvote 0
Note - keep the sum range & the criteria ranges the same number of columns.
 
Upvote 0
Thanks guys, never knew you could offset the ranges!

Every day's a school day :)
 
Upvote 0

Forum statistics

Threads
1,214,858
Messages
6,121,960
Members
449,057
Latest member
FreeCricketId

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