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 Training and help » Formulas
Formulas
Resolved · Low Priority · Version Standard
Simon has attended:
Excel VBA Intro Intermediate course
Formulas
How do I imbed formulas into VBA macro code?
RE: Formulas
Hi Simon
Thankyou for your question
I am assuming that you want to use the functions that come as standard with Excel
These functions are called worksheet functions, and are child objects of the application object. The following code uses the sum function to add up a given range of cells and insert it into cell b31
Range("b31").Value = Application.WorksheetFunction.Sum("B2:B30")
All the standard functions can be accessed in this way
Hope this is useful
Regards
Stephen
Training information:
See also:
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:Sorting List SubtotalsIf you find that you would prefer to show the items in a subtotalled list in a different order, eg ascending rather than descending, you can sort your list. To sort a subtotalled list, hide the detail rows and then sort the subtotal rows. When you sort a subtotalled list, the hidden detail rows are automatically moved with the subtotal rows. |