Find-Insert Column-Total Macro

djfreex

New Member
Joined
Aug 8, 2008
Messages
11
I have multiple data sets that looks like below in exact same format. I am trying to create a macro that subtotals in between the datasets based a particular column location. So, first subtotal column is always 12 cells to the right of the column that contains "Prod1". So, essentially macro would insert columns shaded in yellow and add up the same label columns under subtotal to that point. Note the raw data formatting includes merged cells.

Excel Workbook
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
11*2011****************************
12*Prod1Prod2Prod3SubTotalProd4Prod5Prod6SubTotal
13*AB%CAB%CAB%CAB%CAB%CAB%CAB%CAB%C
14Name********************************
15Rep112542%012542%012542%0361542%012542%012542%012542%0361542%0
16Rep22700%02700%02700%08100%02700%02700%02700%08100%0
17Rep3900%0900%0900%02700%0900%0900%0900%02700%0
18Rep41400%01400%01400%04200%01400%01400%01400%04200%0
19Rep53500%03500%03500%010500%03500%03500%03500%010500%0
Sheet1


Any help in the right direction would be appreciated. Thanks in advance.

Not even sure if this is the right way to think about this problem.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,224,583
Messages
6,179,673
Members
452,937
Latest member
Bhg1984

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