Calculate cells based on the range of one item code and at the same time exclude the first row of that item code, or if possible base the formula on the color of the cells

Hi,
I have a requirement to calculate the lowest price excluding zero, based on an inconsistent range of rows.  When calculating these rows I need to exclude the first row of each (grey row) from the range.   These scenarios as per the attached file, will occur in multiple workbooks.  I have to somehow calculate based on the range of one item code and at the same time exclude the first row of that item code, or if possible base the formula on the color of the cells.
Thanks
Example.xlsx
Snappa2000Asked:
Who is Participating?
 
Rob HensonConnect With a Mentor Finance AnalystCommented:
If you are using the product ID as one of the criteria of SUMIF/MAXIF/MINIF etc then you don't need to specify your range; you can just use the whole range down to the last row and let the product ID criteria determine which rows it needs to look at.

For example, if you implement the TRUE/FALSE indicator as suggested in column J:

=SUMIFS($F$1:$F$20,$B$1:$B$20,$B2,$J$1:$J$20,TRUE)

That would only sum the TRUE from column J and the product ID in column B that match B2

Thanks
Rob H
0
 
Rob HensonConnect With a Mentor Finance AnalystCommented:
It's not clear from your example what you are trying to achieve.

Which column(s)/row(s) are you trying to calculate?

As a simple check, you could add a helper column with this formula, starting at row 2 and copied down:

=B2=B1

This will give TRUE / FALSE as result, the first row of each set will be FALSE as they do not match the row above, you can then use the TRUE results as a criteria in your calculations.
0
 
Snappa2000Author Commented:
Thanks,

I am trying to calculate (in this example) cells range F2 to I2, F7 to I7 etc (the grey rows/blue columns)
If using a helper column, I don't know of a simple way of determining the range, could be 4 rows, could be 2 rows.

Cheers
0
 
Snappa2000Author Commented:
Thanks Rob
Had to use the MIN(IF but looks like it's giving me what I need.

Thanks again
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.