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
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!