ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   adding a row with a looping macro (https://www.excelbanter.com/excel-programming/402354-adding-row-looping-macro.html)

april

adding a row with a looping macro
 
2nd question of the day - thanks in advance for the help.
i have a spreadsheet that was subtotaled and even after i removed the
subtotals, there is still a column with the word "Total" in it (Column C).
the word does not occur in a particular pattern. every time that the word
"Total" appears in that column, i want to add 2 rows and copy the word
"Total" to one of those rows. i tried to filter that column, but when the
filter is on, you can't add columns
- account code Account Description Jly Aug Sep
01-1-1-02-50701 507 Travel - Train & Airfare-President - - -
forecast 01-1-1-02-50701 507 Travel - Train & Airfare-President - -
-
01-1-1-02-50702 507 Travel - Hotels-President - - -
forecast 01-1-1-02-50702 507 Travel - Hotels-President - - -
01-1-1-02-50703 507 Travel - Meals-President - - -
forecast 01-1-1-02-50703 507 Travel - Meals-President - - -
01-1-1-02-50707 507 Travel - Others-President - - -
forecast 01-1-1-02-50707 507 Travel - Others-President - - -
01-1-1-02-50708 507 Travel - Ground Transportation-President - - -

forecast 01-1-1-02-50708 507 Travel - Ground Transportation-President -
- -
507 Total - -

01-1-1-02-51201 512 Legal-President 3,680 - -
forecast 01-1-1-02-51201 512 Legal-President 3,680 - -
01-1-1-02-51206 512 Other Consultancy-President 3,071 5,321 3,071
forecast 01-1-1-02-51206 512 Other Consultancy-President 3,071 5,321
3,071
512 Total

the above is a portion of the worksheet-

aprilshowers

OssieMac

adding a row with a looping macro
 
Hi April,

You said ' i tried to filter that column, but when the filter is on, you
can't add columns'

Use subtotal function in conjunction with autofilter to sum the visible
data. Check help for the parameters.

--
Regards,

OssieMac


"april" wrote:

2nd question of the day - thanks in advance for the help.
i have a spreadsheet that was subtotaled and even after i removed the
subtotals, there is still a column with the word "Total" in it (Column C).
the word does not occur in a particular pattern. every time that the word
"Total" appears in that column, i want to add 2 rows and copy the word
"Total" to one of those rows. i tried to filter that column, but when the
filter is on, you can't add columns
- account code Account Description Jly Aug Sep
01-1-1-02-50701 507 Travel - Train & Airfare-President - - -
forecast 01-1-1-02-50701 507 Travel - Train & Airfare-President - -
-
01-1-1-02-50702 507 Travel - Hotels-President - - -
forecast 01-1-1-02-50702 507 Travel - Hotels-President - - -
01-1-1-02-50703 507 Travel - Meals-President - - -
forecast 01-1-1-02-50703 507 Travel - Meals-President - - -
01-1-1-02-50707 507 Travel - Others-President - - -
forecast 01-1-1-02-50707 507 Travel - Others-President - - -
01-1-1-02-50708 507 Travel - Ground Transportation-President - - -

forecast 01-1-1-02-50708 507 Travel - Ground Transportation-President -
- -
507 Total - -

01-1-1-02-51201 512 Legal-President 3,680 - -
forecast 01-1-1-02-51201 512 Legal-President 3,680 - -
01-1-1-02-51206 512 Other Consultancy-President 3,071 5,321 3,071
forecast 01-1-1-02-51206 512 Other Consultancy-President 3,071 5,321
3,071
512 Total

the above is a portion of the worksheet-

aprilshowers



All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com