We help IT Professionals succeed at work.
Get Started

Add a comment with information in it? In VBA?

gisvpn asked
Last Modified: 2012-09-21

I have a question - but I am not sure if it can be done.

I have a spreadsheet as attached which I would like to add comments (via vba) into the summary tab in cells J15,16,17,18,19 and 20. I would like to comments to be information derived from data on the data tab - i'll try to explain a little more.

On the summary tab there is a code i.e. in F15,16,17 etc.. This code will match up with one listed on the datasheet column E. On the data sheet there is also a name in column F and a number (hours) in column J.

I would like the VBA code to start with cell J15 and insert a comment (as in the spreadsheet example attached) each time the code shown in F15 is found on the data tab in column E - but I would like it to summarise names found in column F and the total hours in column J.

Each line in the comment added should show the following (as in the attached example).

(1) Joe - 4 Hours

The (1) is the number of times 'Joe' was found against the code in F15. 'Joe' is the name found and '- 4 hours' is the total of the figures found against Joe under the code shown in F15.

Hopefully the attached spreadsheet will help get my requirement across alot more than here ;)

Can this be done at all?


Watch Question
Software Engineer
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE