How Do I Copy a Table Data to a Report, Sum some Columns, Omitting others?

TedJL

New Member
Joined
Feb 26, 2014
Messages
2
I recall seeing this operation done very simply but don't recall the function or macro. Suppose I have the table A1..G5 as a list of materials and manhours to produce them. After selecting quantities, I want to extract only those rows that are not zero and omit certain other columns, i.e. columns D and E in the example, and paste them somewhere in summary form, such as in columns H through L in the example. I also want the subtotal columns summed for the grand total at the bottom. I think this was done using a copy and paste function or macro or combo of both. It was in an MS DOS version of Excel, and the pasting range had the desired column headers predefined before the macro was initiated. I believe the first line under each Subtotal column (K3 and L3 in the example) had a pre-filled zero, but don't know if it was from a formula or what. That's all I remember. Any ideas?

A
B
C
D
E
F
-->
H
I
J
K
L
1
Main Tbl
-->
2
Qty
Descr.
Units
MH/Unit
$/Unit
Subtotal MH
Subtotal $ Mat'l
-->
QTY
Descr.
Units
Subtot. MH
Subtot. $ Mat'l
3
1
WidgetA
Ea
.25
0.33
=A3*D3
=A3*E3
-->
1
WidgetA
Ea
.25
.33
4
WidgetB
Ea
.25
0.33
=A4*D4
=A4*E4
-->
2
WidgetB
Ea
.35
.41
5
2
WidgetC
Ea
.35
.41
=A5*D5
=A5*E5
-->
Grand Tot.
=@Sum(K3..K4)
=@Sum (L3..L4)


<tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Sorry I omitted the designator for column G. And cell I4 should read "WidgetC" not "WidgetB".
 
Upvote 0

Forum statistics

Threads
1,215,635
Messages
6,125,948
Members
449,275
Latest member
jacob_mcbride

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