Sumif a row based on one cell in that row

MKershner

New Member
Joined
Nov 16, 2015
Messages
19
I have a worksheet with about 300 rows and 100 columns. I need to sum the rows based on one cell in the beginning of the row that contains text. I want to be able to type the text in a cell at top of the last column and use that as the reference to sum.

Here is the formula that is not working (returning zeros):
=SUMIF(C6,"="&$CK$4,F6:CI6)

Any ideas to make this work?!

Thanks!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
So if $CK$4 is Blank, then SUM(F6:CI6)

If $CK$4 is NOT blank, then
If C6=$CK$4, then SUM(F6:CI6)

Otherwise do nothing

Right?

=IF(OR(C6=$CK$4, $CK$4=""),SUM(F6:CI6),"")
 
Upvote 0
That is still picking up the blanks in column C.

If C6 is blank then I do not need the sum of F6:CI6.

If $CK$4 is blank then only sum F6:CI6 if C6 is not blank. If there is a value in $CK$4 then only sum F6:CI6 if that value is in C6.

I feel like this may be a losing battle with excel for me!
 
Upvote 0
So
if CK4 is Blank AND C6 is NOT blank, then SUM(F6:CI6)
if CK4 is Blank AND C6 is Blank, then do nothing
If CK4 is NOT Blank AND C6=CK4, then SUM(F6:CI6)
If CK4 is NOT Blank AND C6<>CK4, then do nothing

Is that right?
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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