Collapsing a Spreadsheet

Altum681

New Member
Joined
Sep 10, 2014
Messages
12
Hello. I have a spreadsheet that will always have, at most, the same group of rows, but some may be missing, so the rows may not always be numbered the same. For example, Accumulated Depreciation will always be there, but may be row 27 or 17. I would like to find a code that will seek out certain rows, based on the first word (in columns D or E) and add it to another total. An example is shows below. Basically I would like to create a new row called Marketing/Trading Expense, add Total 70100 Marketing Expense to Total Travel and Entertainment in the new cell, then delete the component cells. I would then mimic this to other groupings. Any thoughts? Newb programmer.
70100 · Marketing Expenses0.00
70160 · Conference Expenses28,644.790.000.0028,644.79
70200 · Marketing/Branding Expense74,239.190.000.0074,239.19
70100 · Marketing Expenses - Other23,143.750.000.0023,143.75
Total 70100 · Marketing Expenses126,027.730.000.00126,027.73
Travel and Entertainment0.00
Employee Entertainment-4,002.750.000.00-4,002.75
64700 · Employee Hotel68,926.010.000.0068,926.01
Employee Meals37,960.720.000.0037,960.72
Employee Travel189,657.090.000.00189,657.09
Investor Hotel5,085.630.000.005,085.63
Investor meals50,741.580.000.0050,741.58
Investor travel4,143.560.000.004,143.56
64300 · Meals and Entertainment24,599.420.000.0024,599.42
Total Travel and Entertainment377,111.260.000.00377,111.26

<colgroup><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Watch MrExcel Video

Forum statistics

Threads
1,123,124
Messages
5,599,839
Members
414,342
Latest member
K Darrell Smith

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
Top