Hi,
Current situation
I've several tables within a sheet.
Tables have different columns and rows regarding headers and contents.
Some sheets have 10 tables and others have 30, so I can not determine the exact number of tables within the sheet.
But all tables ending with a column contain a year number plus a word (this word changes from one table to another), the current table has "2016 Balance(Amount)", so other tables may have a different word, but always there is a year then a space, then the word which is "Balance(Amount)" in our example.
Requirements
From time to time I need to add a new column for a new year, so I go through all the tables manually and copy the last column for each table using the black small arrow that appears on the top of the column when you hover the mouse over the top of the first cell of the column, then press Ctrl+C to copy the entire column, then I press the right arrow then press Ctrl+V to paste formulas and format.
So now the newly added column includes the last year's contents, so I do an extra step which is deleting the last year's contents which is associated with the column titled Amount/Equation "This column may be in a different place in another tables, but always will have the same header" where the cell in that row has the word "amount" and keep the contents if the cell has the word "equation".
So the end result will be:
- adding a new column.
- copy only equations to the newly added column.
- clear any other contents from the newly added column.
- end result is: new column for the new year, only equations copied to that column, and all other contents get cleared from the newly added column.
AddNewYearMacro.xlsx
1.png
2.png
3.png
4.png
Bookmarks