vbaexcel

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA/Excel

VBA/Excel

resolvedResolved · Low Priority · Version 2003

Justin has attended:
Excel VBA Intro Intermediate course

VBA/Excel

If in the VB code you have told it to add cell A1 with cell A2 and return the answer in cell A3, can you get the code to return the answer as well as the formula used.

eg

So if A1 = 2 and A2 = 3, cell A3 returns 5, as wells as showing when you click in cell A3 that the calculation is =A1+A2

RE: VBA/Excel

Hi Justin,

Thank you for your question and sorry about the delay in responding.

After speaking to my colleague I would suggest you use the FormulaR1C1 property of the activecell object and then create a loop to repeat the procedure for the other totals.

During the course I believe you were starting to think along these lines.

I hope this helps.

Regards

Simon

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Auto-insert the current time

In Microsoft Excel, to enter the current time into a cell, hold CTRL+SHIFT and press SEMICOLON.

View all Excel hints and tips


Server loaded in 0.07 secs.