excel 2003 training - excel

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

Forum home » Delegate support and help forum » Microsoft Excel Training and help » excel 2003 training - Excel

excel 2003 training - Excel

resolvedResolved · Low Priority · Version Standard

Kevin has attended:
Excel Advanced course

Excel

How do you create a customised function

RE: Excel

Hi Kevin

Thank you for your question.

I think this is best answered with a specific example. We will create a function called VatPre which will take any price that includes VAT and work out the non VAT element of that. Go to the VBE by pressing ALT-F11 and create a new module. In the code window type the following

private function VatPre(VAT as single) as single

vatPre = VAT/1.175

end function


The line "private function VatPre(VAT as single) as single" defines the function as having one argument "VAT" which will be the amount including VAT.

The line "VatPre = VAT/1.175" simply sets the value of the function equal to VAT divided by 1.175.

I hope this helps. If you have any further questions please do not hesitate to ask

Regards

Stephen

 

Training courses

 

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Entering text in Multiple Worksheets

If you have a number of worksheets in a workbook that require the same information (data or tables) on each worksheet, this can be done as follows:

Hold down the Ctrl key and click one or more of the additional worksheet tabs (i.e. Sheet2, Sheet3, etc).

In your mainsheet (Sheet1) enter the required data or design a table.

When done 'Click' on the other sheet tabs and you will see that the information entered in Sheet1 is on all the other selected worksheets.

NB Do not forget to deselect the worksheets - otherwise you may add data to the main worksheet and all the selected worksheets will also have that data!

View all Excel hints and tips


Server loaded in 0.09 secs.