Good day everyone. I'm trying to sum cells if 2 other cells are equal which is easy enough but I don't want to display the value of the 2nd equal cell, which I am doing by setting that to zero. But if I have a cell that is not equal to another cell, I do want to display that value.
Hopefully, the attached spreadsheet will show what I'm attemtping. The 2nd block is how I would like it to come out.
I want to only show one value for the cells that have equal values in cell A but not list the value of the 2nd or subsequent matching cells. But if I have an occurence in cell A that is only listed once I want to show that value in cell C.
My formula is: =IF(A1=A2,B1+B2,"0") and I realize that's why a unique occurence is being listed as zero also.
Hope that makes sense. Please let me know if you need more info.
Thanks
Jay
If your data starts in A2 you can use the following formula in C2 and copy down
=IF(A2=A1,0,SUMIF($A$2:$A$10,A2,$B$2:$B$10))
Adjust the range to suit your data
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks