Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

vbaexcel

ResolvedVersion 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:

Deleting a range of cells using the autofill handle

Firstly, select the range of cells for which you would like to clear the contents. Then drag the autofill handle to the the top left corner of the selection whilst holding down the shift key. Your selected contents should then be deleted.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.