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

functions

ResolvedVersion 2007

Chris has attended:
Excel VBA Intro Intermediate course

Functions

When functions were used to generate the totals, they appeared in the spreadhseet as values. Is it possible to insert them as formulae instead of values, so that they can be edited?

Edited on Mon 18 May 2009, 08:46

RE: functions

Hi Chris

Thank you for your question

The easiest way to do this is to use the formulaR1C1 method of the range object. For example

ActiveCell.FormulaR1C1 = "=AVERAGE(RC[-4]:RC[-2])"


Places a function that calculates the average values in the cells 4 to 2 columns to the left of the active cell. I suggest manually entering some formulae into a worksheet while the macro recorder is on, so that you can get a better feel for the syntax

Regards

Stephen

Tue 26 May 2009: Automatically marked as resolved.

 

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:

Hiding and unhiding rows using the keyboard

CTRL + 9 hides your columns and CTRL + SHIFT + ( unhides them although you would need to highlight the row letters either side as per normal

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.