98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Functions
Functions
Resolved · Low Priority · Version 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?
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 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
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Multiple Lines of Text in a CellAs an alternative to the Text Wrapping facility, type a word or two, press Alt+Enter to get a new line, type more text, and continue the process for as many lines as you need. Enter as normal when you have finished. |