functions
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

Functions

resolvedResolved · Low Priority · Version 2007

replyReply Thu 14 May 2009, 16:37Delegate Chris said...

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?

For upcoming training course dates see: Pricing & availability

replyReply Mon 18 May 2009, 08:45 Edited on Mon 18 May 2009, 08:46Trainer Stephen said...

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.

 

Please browse our web site to find out more about
excel training microsoft and other Microsoft training courses.

Excel tip:

Sorting data stored in rows

Primarily Excel is set up to sort data that is stored in columns rather than rows.

It is possible to get Excel to sort data stored in rows however.

Click in the row you want to sort, or select the cells in the rows you wish to sort.

Go to Data - Sort, then go to the Options button in the bottom left corner of the Sort dialogue box.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard