I am a beginner to VBA, actually just learning by googling and recording macros then modifying them, but im stuck over here.
It seems like such a simple problem, but arrghhh..its driving me crazy!!!
Ok..here goes...
I have a table containing 300 rows and about 30 Columns. It is a typical cash flow file in excel.
Each column has a total in the end. What i need is to insert comments on the cell containing these totals. The comment itself should include the description of the item and the amount, see below example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Category[/TD]
[TD]Item[/TD]
[TD]April[/TD]
[TD]May[/TD]
[TD]June[/TD]
[/TR]
[TR]
[TD]Fruits[/TD]
[TD]Bananas[/TD]
[TD]-
[/TD]
[TD]15[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Travel[/TD]
[TD]Taxi[/TD]
[TD]10[/TD]
[TD]-[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]Veggies[/TD]
[TD]Spinach[/TD]
[TD]-[/TD]
[TD]5[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Travel[/TD]
[TD]Taxi[/TD]
[TD]5[/TD]
[TD]-[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]Fruits[/TD]
[TD]Apples[/TD]
[TD]15[/TD]
[TD]10[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Fruits[/TD]
[TD]Oranges[/TD]
[TD]5[/TD]
[TD]10[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Veggies[/TD]
[TD]Carrots[/TD]
[TD]-[/TD]
[TD]20[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Fruits[/TD]
[TD]Mangoes[/TD]
[TD]-[/TD]
[TD]-[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]TOTAL[/TD]
[TD][/TD]
[TD]35[/TD]
[TD]60[/TD]
[TD]35[/TD]
[/TR]
</tbody>[/TABLE]
Now, on the cell April - Total, i need to insert a comment saying
"Travel - Taxi - 10
Travel - Taxi - 5
Fruits - Apples - 15
Fruits - Oranges - 5"
The cell May - Total should have a comment displaying this
"Fruits - Bananas - 15
Veggies - Spinach -5
Fruits - Apples - 10
Fruits - Oranges - 10
Veggies - Carrot - 20"
And so on and so forth. Like i said, the actual excel has over 300 rows and 20 columns out of which several items are zero in value, so doing this manually is absurd. Right now i am filtering all columns to remove the non-zero items, copying the text and manually entering the data as comment because i can not copy-paste to a comment.
There was a similar add-on that used to accomplish this in previous (<2003) excel versions called MoreFunc. Unfortunately they don't have this for the newer versions. I am currently using 2013.
Any help on this would be greatly appreciated.
It seems like such a simple problem, but arrghhh..its driving me crazy!!!
Ok..here goes...
I have a table containing 300 rows and about 30 Columns. It is a typical cash flow file in excel.
Each column has a total in the end. What i need is to insert comments on the cell containing these totals. The comment itself should include the description of the item and the amount, see below example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Category[/TD]
[TD]Item[/TD]
[TD]April[/TD]
[TD]May[/TD]
[TD]June[/TD]
[/TR]
[TR]
[TD]Fruits[/TD]
[TD]Bananas[/TD]
[TD]-
[/TD]
[TD]15[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Travel[/TD]
[TD]Taxi[/TD]
[TD]10[/TD]
[TD]-[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]Veggies[/TD]
[TD]Spinach[/TD]
[TD]-[/TD]
[TD]5[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Travel[/TD]
[TD]Taxi[/TD]
[TD]5[/TD]
[TD]-[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]Fruits[/TD]
[TD]Apples[/TD]
[TD]15[/TD]
[TD]10[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Fruits[/TD]
[TD]Oranges[/TD]
[TD]5[/TD]
[TD]10[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Veggies[/TD]
[TD]Carrots[/TD]
[TD]-[/TD]
[TD]20[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]Fruits[/TD]
[TD]Mangoes[/TD]
[TD]-[/TD]
[TD]-[/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD]TOTAL[/TD]
[TD][/TD]
[TD]35[/TD]
[TD]60[/TD]
[TD]35[/TD]
[/TR]
</tbody>[/TABLE]
Now, on the cell April - Total, i need to insert a comment saying
"Travel - Taxi - 10
Travel - Taxi - 5
Fruits - Apples - 15
Fruits - Oranges - 5"
The cell May - Total should have a comment displaying this
"Fruits - Bananas - 15
Veggies - Spinach -5
Fruits - Apples - 10
Fruits - Oranges - 10
Veggies - Carrot - 20"
And so on and so forth. Like i said, the actual excel has over 300 rows and 20 columns out of which several items are zero in value, so doing this manually is absurd. Right now i am filtering all columns to remove the non-zero items, copying the text and manually entering the data as comment because i can not copy-paste to a comment.
There was a similar add-on that used to accomplish this in previous (<2003) excel versions called MoreFunc. Unfortunately they don't have this for the newer versions. I am currently using 2013.
Any help on this would be greatly appreciated.