How to combine values from multiple rows into a single row in Excel

dudewheresmyvba

New Member
Joined
Jul 6, 2017
Messages
29
I have found a post that similar what I need to be done, but I do not know how to convert it to fit my purposes and data. I am not sure if I can link it here but ( How to combine values from multiple rows into a single row in Excel? - Super User ). What is different is that I am wanting to sum rows together so that the numerical value is accurate but my COUNT is not artificially high. Rows that are to be summed will have the same alphanumeric value in column B.

The matching rows that should act as the key is in column B, cells that should be summed are in column U, Y, AC, and AD.
I do not want the "extra" rows to be deleted or the values in them to be wiped though. This issue is giving me pain so help or other ideas to address this is appreciated. Also if you include some notes on how your code works that would be amazing.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Can you use something like this. I am referring to your linked example. I have used and index...small(if(...frequency formula. I also attached an iferror( to remove errors. I used this formula to isolate the three years for both the customers.. I used this formula to get the customer and year results. You need to make sure for $ area are correct in you formula. Then I used a simple sumifs formula to produce the values. I just did this to get one value. The I used a simple counta(non-numbers) and count formula (numbers).I set aside criteria cells for each value and year. My large formula is [TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"] =IFERROR(INDEX($A2:A$11,SMALL(IF(FREQUENCY(IF($A2:A$11<>"",MATCH($A2:$A11&$D$2:$D$11,$A2:A$11&$D$2:$D$11,0)),ROW($A$2:$A$11)-ROW($A$2)+1),ROW($A$2:$A$11)-ROW($A$2)+1),ROWS($A$14:A14)))," ") Use Cntrl+Shift+Enter to enter. Copy down

[TABLE="width: 512"]
<colgroup><col width="64" span="8" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]Customer[/TD]
[TD="width: 64"]Value A[/TD]
[TD="width: 64"]Value B[/TD]
[TD="width: 64"]Year[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"]a[/TD]
[TD="width: 64"]b[/TD]
[TD="width: 64"]c[/TD]
[/TR]
[TR]
[TD="class: xl65"]a[/TD]
[TD="align: right"]134[/TD]
[TD][/TD]
[TD="align: right"]2009[/TD]
[TD][/TD]
[TD="align: right"]2009[/TD]
[TD="align: right"]2010[/TD]
[TD="align: right"]2011[/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2009[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD="align: right"]175[/TD]
[TD][/TD]
[TD="align: right"]2010[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]2010[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD="align: right"]7784[/TD]
[TD][/TD]
[TD="align: right"]2011[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD="align: right"]515[/TD]
[TD][/TD]
[TD="align: right"]2009[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD="align: right"]1946[/TD]
[TD][/TD]
[TD="align: right"]2010[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2010[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD="align: right"]9745[/TD]
[TD][/TD]
[TD="align: right"]2011[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD][/TD]
[TD="align: right"]154[/TD]
[TD="align: right"]2011[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Customer[/TD]
[TD]Value A[/TD]
[TD]Value B[/TD]
[TD]Year[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD="align: right"]134[/TD]
[TD][/TD]
[TD="align: right"]2009[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2010[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2011[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2009[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2010[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2011[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

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