sum of rows based on tow other columns, place result on first occurance

FROGGER24

Well-known Member
Joined
May 22, 2004
Messages
704
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
afternoon everyone,
In my spreadsheet I need to look at the values in D2 and E2 to see if they equal any rows below in dataset (data sorted in columns), if so I would like the sum of the values in column I, the result will be in column K. would like the result to be in the first row of that "unique" dataset

Thanks
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Best guess from your description would be something like
Excel Formula:
=IF(COUNTIFS(D$2:D2,D2,E$2:E2,E2)=1,SUMIFS(I$2:I2,D$2:D2,D2,E$2:E2,E2),"")
A mini sheet created with XL2BB is always a good way to add meaning to a description.
 
Upvote 0
Thanks for response. When I entered the formula I get zero as the results. for clarification purposes I need to look in columns D and E for all matches of that data (PO # and material name) Column I have the shipped quantity, so i want to add all the matches column I based on matches in column D&E and put sum in the first row of the match in column K. This is my attempt, I don't know how to make it work if there or additional matches in column D&E.
=IF(CONCATENATE(D2&E2=D3&E3),I3,I2)
 
Upvote 0
What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also please post some sample data showing expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Trip NumberGradeABL NSV
USEVESSAPC-2101-013apple3010
USEVESSAPC-2101-013apple20
5214315grape6010
5214315grape20
5214315grape30
2020-BT-BM-EHC65-20nanner400400


Would to look in columns D and E if the rows are duplicates then sum same rows as column d and e in "T" with results in column "I". Thanks
 
Upvote 0
How about
Excel Formula:
=IF(COUNTIFS(D$2:D2,D2,E$2:E2,E2)=1,SUMIFS(T:T,D:D,D2,E:E,E2),"")
Please don't forget this
What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Solution
Hi,

Try this:

Book3.xlsx
DEIT
1Trip NumberGradeABL NSV
2USEVESSAPC-2101-013apple3010
3USEVESSAPC-2101-013apple 20
45214315grape6010
55214315grape 20
65214315grape 30
72020-BT-BM-EHC65-20nanner400400
Sheet857
Cell Formulas
RangeFormula
I2:I7I2=IF(COUNTIFS(D$2:D2,D2,E$2:E2,E2)=1,SUMIFS(T$2:T$100,D$2:D$100,D2,E$2:E$100,E2),"")
 
Upvote 0
How about
Excel Formula:
=IF(COUNTIFS(D$2:D2,D2,E$2:E2,E2)=1,SUMIFS(T:T,D:D,D2,E:E,E2),"")
Please don't forget this
Nailed it thank you for your help, profile updated
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top