My goal is to run a script that check the indent on column A:A, copy the values of column B:B to Column C:C, but insert subtotal formula for some lines depending on the indent, in this example are "A"; "B"; "B.1".
Sorry, i forgot to show one table with the example.
I have already this table but it is all values, and the values in bold are values and not "sum" or "subtotal".
My goal is to replace all the bold values with subtotal(9;....) formula. Instead of replace, i don't mind to have a new column, for example column "C", like the example.
Before this process is started, does your column B look like you have shown in post 3 or does it look like my column B below, or something else?
By "indent" do you mean a physical indent in the cell like below (I have just used _ characters to force the look) or do you mean the suffixes like .1 or .1.1?
Does it have to be a SUBTOTAL formula or if another formula is possible to get the result could that be used?
Does it have to be done by vba or, if possible, a worksheet formula would do?
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.