Sum Cells Based on Data in Two Columns
I need to sum the Cost Per SKU for Transfer ID based on the Uniqueness of the Transfer ID. My brain cannot come up with a way to do this even though I know it is probably possible. What formula do you recommend?
Here is a snapshot of the helper columns I already have and the two columns with data.
Best Answer
-
Hi @cvarela
Determine which items are duplicated:
Formula in the Duplicate column: =IF(COUNTIF([Transfer ID]$1:[Transfer ID]@row, =[Transfer ID]@row) > 1, 1, 0)
Formula in the Cost Per Transfer ID column: =IF(Duplicate@row = 0, SUMIFS([Cost Per SKU for Transfer ID]:[Cost Per SKU for Transfer ID], [Transfer ID]:[Transfer ID], =[Transfer ID]@row), "-")
You can make the Duplicate column a Checkbox and it will show checked for 1 and blank for 0.
Hope this helps!
Answers
-
Hi @cvarela
Determine which items are duplicated:
Formula in the Duplicate column: =IF(COUNTIF([Transfer ID]$1:[Transfer ID]@row, =[Transfer ID]@row) > 1, 1, 0)
Formula in the Cost Per Transfer ID column: =IF(Duplicate@row = 0, SUMIFS([Cost Per SKU for Transfer ID]:[Cost Per SKU for Transfer ID], [Transfer ID]:[Transfer ID], =[Transfer ID]@row), "-")
You can make the Duplicate column a Checkbox and it will show checked for 1 and blank for 0.
Hope this helps!
-
@ker9 That is exactly what I was looking for! Thank you so much for teaching me!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!