Sum IF?

JubberB

New Member
Joined
Nov 1, 2019
Messages
39
Question: I have a report with several columns & rows and I want to sum the entire range if the column header (first cell in column) contains certain text - meaning, Column A1 may contain "9:00AM Admission" or "10:00AM Admission", etc. If the column header contains the word "ADMISSION" I want to sum all cells in a range that includes several columns an rows. There are columns included in the range that do not include the word "ADMISSION" So, A1 may = "9:00AM Admission", B1 may = "Equipment Rental", C1 may = "10:00AM Admission" So I would want to sum all rows in columns A, C, (because the headers contain "ADMISSION") but not B. How do I do that?
Thanks!
JohnB
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Excel Formula:
=SUMPRODUCT((ISNUMBER(SEARCH("ADMISSION",UPPER($A$1:$C$1))))*$A$2:$C$100)
This is an array formula. Hitting only Enter is not enough.
You must press Ctrtl+Shift+Enter together after paste.
 
Upvote 0
MrExcelPlayground15.xlsx
ABCDEFG
19:00 AdmissionOther thing10:00 Admission11:00 AdmissionThat thingAdmissions:
260681735213317
372427952100
46858923021
55075779868
657866710100
73319417823
82345641595
94349717417
101028936069
111935277399
127211376915
133778271780
145258983557
158130589614
161278296319
177673991782
184326896046
196412638832
205666245157
219232408462
Sheet3
Cell Formulas
RangeFormula
G2G2=SUM((ISNUMBER(SEARCH("Admission",A1:E1)))*A2:E21)
 
Upvote 0
James Canale,
THANK YOU! Worked perfectly!
One last question, please: Same desired result, but rather than searching for "Admission" I want to search for a few "keywords"? Key words are:
Slide
Santa
Skating
Rentals

THANK YOU AGAIN!
JubberB
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
MrExcelPlayground15.xlsx
ABCDEFGHI
19:00 Admission rentalsOther thing10:00 Admission11:00 AdmissionThat thing slideAdmissions:Admission
260681735214394Slide
372427952100Santa
46858923021Skating
55075779868Rentals
657866710100
73319417823
82345641595
94349717417
101028936069
111935277399
127211376915
133778271780
145258983557
158130589614
161278296319
177673991782
184326896046
196412638832
205666245157
219232408462
Sheet3
Cell Formulas
RangeFormula
G2G2=SUM(SIGN(MMULT({1,1,1,1,1},IFERROR(SEARCH(I1:I5,A1:E1),0)))*A2:E21)
 
Upvote 0

Forum statistics

Threads
1,223,939
Messages
6,175,532
Members
452,651
Latest member
wordsearch

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