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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
20sepvk.png
[/IMG]

Does this help?
 
Upvote 0
not for me, can't copy it, to work with.

It also be good, to add the expected result in your example.
 
Upvote 0
Thank you! I was just playing with that formula as you responded. I had:
=SUM(IF(C6=$CK$4,SUM(F6:CI6),0))

Is there anything I can put in cell CK4 (some sort of wildcard) that would make the formula return a value no matter what was in column C? There are blanks. I want only the sum of the rows that have a value in C.
 
Upvote 0
I am trying to find a way to use that reference cell to total by item but if I leave it blank then total all items with a value in item column. This is what I came up with:
=IF(C6=$CK$4,SUM(F6:CI6),IF($CK$4=""*AND(C6<>""),SUM(F6:CI6),0))

If there is a value in the reference cell the formula works, if I leave it blank it doesn't work. Any suggestions?
 
Upvote 0
It's hard to understand what you're trying to do.
A more clear description (in words, not with formula that doesn't work) of what you want would help...

Perhaps you want

=IF(OR(C6=$CK$4,AND($CK$4="",C6<>"")),SUM(F6:CI6),"")
 
Upvote 0
In that reference cell I want to be able to type in one of the items (ie. GC, F, L) but if I leave it blank I want the formula to capture them all. There are blank items throughout the sheet. I don't need to capture the value of the blank items.

Does that make more sense?

And thank you so much, you have been incredibly helpful! :)
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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