I wish to use VBA to add a note to a cell. This note should be the cell values from a different tab.
I have the tab - Current Total Breakdown. I wish to copy cells H5 and H6 in this tab into the note on cell K5 on the Monthly Totals tab. I would also like the cell value in H5 to be on one line and the value of H6 on another line.
For example, if H5 and H6 in the Current Total breakdown tab are equal to "Hi x 10" and "Hello x 20" respectively:
I would like K5 in Monthly Totals to have a comment saying:
Hi x 10
Hello x 20
as shown one below the other so i know they're from different cells.
I have to repeat this too. I know how to write I'm not very good with VBA but I know how to write the select, copy and paste and even add a note to a cell but not in the format I wish like above.
Not really sure at all how I would go about this so would greatly appreciate and help and if you could break the code down for me so I can edit it for my other ranges I need to apply it.
Code i've got so far (tried to record the macro; not 100% sure what the last line is doing).
Sheets("Current Total breakdown").Select
Range("H5").Select
Selection.Copy
Sheets("Monthly Totals").Select
ActiveCell.Offset(-19, 8).Range("A1").Select
Application.CutCopyMode = False
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:=Chr(10) & "" & Chr(10) & ""
ActiveCell.Offset(16, -6).Range("A1").Select