I am using Excel 365. I have looked and tried for hours but have been unable to come up with a good formula.
I have a worksheet with multiple columns. I need to write a formula (not a macro) in a 3rd column that sums only the unique values in column G but only for the rows that have duplicate values in column B. I have plenty of room for helper columns if needed. The formula should give one result for each unique ID number
I tried in an empty column T
=unique(B2:B1000)
then in Column U
=SUMIF(B2:B6,T2#,G2:G1000)
But this sums all instances where the ID is duplicated. I only want it to sum the unique values from columns G
So for example in the chart below.
The formula result for ID 18959 would be 4 as it would sum row 1 and row 3 because those are unique values within the duplicated range of ID 18959.
Similarly for ID 18960 the response would be 6 because that is the only unique value for that ID.
In my sheet ID is column A and Size is column G
result should look like this
I have a worksheet with multiple columns. I need to write a formula (not a macro) in a 3rd column that sums only the unique values in column G but only for the rows that have duplicate values in column B. I have plenty of room for helper columns if needed. The formula should give one result for each unique ID number
I tried in an empty column T
=unique(B2:B1000)
then in Column U
=SUMIF(B2:B6,T2#,G2:G1000)
But this sums all instances where the ID is duplicated. I only want it to sum the unique values from columns G
So for example in the chart below.
The formula result for ID 18959 would be 4 as it would sum row 1 and row 3 because those are unique values within the duplicated range of ID 18959.
Similarly for ID 18960 the response would be 6 because that is the only unique value for that ID.
In my sheet ID is column A and Size is column G
ID | Size |
18959 | 1.000 |
18959 | 1.000 |
18959 | 3.000 |
18959 | 3.000 |
18960 | 6.000 |
18960 | 6.000 |
18960 | 6.000 |
result should look like this
ID | Size |
18959 | 4.000 |
18960 | 6.000 |