Hi,
I'm attaching a little example of an excel sheet. The actual one is confidential and huge (over 40 columns 650 rows, and 20+ sheets) it also has many macros and apart from column A and B all columns are full with calculations. It has been developed over years through many people.. some knew what they do some didn't, and so far no one made an effort to clear it up.. to add new rows we have a macro, but we can not add new columns, as some of the macros and calculations break. I also think it is not necessary for this calculation that I need to add in, but it could be done with a pivot table in my example, in the excel sheet I have it is not possible.
So: First column is strawberries or blueberries second column is random weight values. The third column decides if they are counted or not (0 or 1) the fourth column is =B*C and D2 is a SUM of D column.
In the C column for the strawberries there is a number, either 0 or 1 but for the blueberries it refers to other cells which are also 0s or 1s but this allows for the blueberries to be counted in cell D2 if we want them to be counted or to not be counted when we don't want them counted. (I need to keep it like that!)
Now the complication is: for the blueberries in C column we refer to 2 other cells, one of them is "Blueberries qtty" the other one is "Additional blueberries". I would need to SUM the Blueberries but not the ones that are additional.
NO MATTER IF THE CELL VALUE IN C IS 0 OR 1 IT ALWAYS NEEDS TO BE THE SAME NUMBER (-4 in the example). There are Blueberries with Negative value in column B, so <0 doesn't work because the negative ones will be counted but they are additional so they shouldn't be. (Row 7 in the example)
Formula would be something like: =SUMIF(A5:A13,"Blueberry",B5:B13) but this doesn't take into consideration that I don't want the "Additional blueberries" counted.
So in my head it should look something like: =SUMIFS(B5:B13,A5:A13,"Blueberry",C5:C13, ???PLEASE HELP???) so how do I express in excel language: C column, whichever row, cell contains =$L$9 cause "=$L$9" doesn't seem to work.. and so far nothing else I tried.
If there is another formula that would do and fit the my excel sheet as I explained above, then I'm open for it just please explain what your formula does.. I'm not really good in excel and I would like to learn.
Bookmarks