Keizzerweiss
Keizzerweiss

Reputation: 81

Sum data based off a criteria and a odd row number

Here is an image of the spreadsheet to give a reference to what I'm talking about

enter image description here

I need to sum the Grey cells in column C when it says "Machine Cycle" next to them in column B.

All of the Grey cells are in odd row numbers.

I would like to try and do this with a formula if possible. If not I'll just code it in VBA based on color or location relevant to "Machine Cycle"

Any help would be great.

Upvotes: 0

Views: 53

Answers (1)

Scott Craner
Scott Craner

Reputation: 152535

Just offset the ranges in a SUMIF():

=SUMIF($B$2:$B$1040000,"Machine Cycle",C3:C1040001)

As you can see the range in column b starts on row two,the value is kept in the first cell of a merged cell.

Then since we want the value one row down from that in Column C we set the range as the same size but one row down.

enter image description here

Upvotes: 2

Related Questions