Consolidating Rows in Excel by summing up some columns while copying the other columns

jfchen1

New Member
Joined
May 22, 2018
Messages
1
9
How do you consolidate rows in which I want certain columns to be added up, but other columns like "Color" and "Qty/Bag" in the example below to not be added up?

[TABLE="width: 1065"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD] [TABLE="width: 1154"]
<tbody>[TR]
[TD]Item[/TD]
[TD] Color[/TD]
[TD] Qty/Bag[/TD]
[TD] Cost/Bag[/TD]
[TD] Sales $/Bag[/TD]
[TD] Profit[/TD]
[TD][/TD]
[TD]Item[/TD]
[TD]Color[/TD]
[TD] Qty/Bag[/TD]
[TD] Cost/Bag[/TD]
[TD] Sales $/Bag[/TD]
[TD] Profit[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD] Red[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]$1.00[/TD]
[TD="align: right"]$1.50[/TD]
[TD="align: right"]$0.50[/TD]
[TD][/TD]
[TD]Apple[/TD]
[TD]Red[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]$1.75[/TD]
[TD="align: right"]$2.80[/TD]
[TD="align: right"]$1.05[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD] Red[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]$0.75[/TD]
[TD="align: right"]$1.30[/TD]
[TD="align: right"]$0.55[/TD]
[TD][/TD]
[TD]Oranges[/TD]
[TD]Blue[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]$1.40[/TD]
[TD="align: right"]$4.00[/TD]
[TD="align: right"]$2.60[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD] Blue[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]$0.75[/TD]
[TD="align: right"]$2.00[/TD]
[TD="align: right"]$1.25[/TD]
[TD][/TD]
[TD]Apples[/TD]
[TD]Green[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]$0.50[/TD]
[TD="align: right"]$1.00[/TD]
[TD="align: right"]$0.50[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD] Blue[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]$0.65[/TD]
[TD="align: right"]$2.00[/TD]
[TD="align: right"]$1.35[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD] Green[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]$0.50[/TD]
[TD="align: right"]$1.00[/TD]
[TD="align: right"]$0.50[/TD]
[TD][/TD]
[TD][/TD]
[TD][/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]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sum:[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]$3.65[/TD]
[TD="align: right"]$7.80[/TD]
[TD="align: right"]$4.15[/TD]
[TD][/TD]
[TD]Sum:[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]$3.65[/TD]
[TD="align: right"]$7.80[/TD]
[TD="align: right"]$4.15[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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