Yen ing excel ora ana fungsi sing dikarepke, bisa digawe dhewe nganggo Visual Basic Module, sing uga dikenal sebagai Visual Basic For Aplication (VBA). Visual Basic Module iki ana uga ing Access, Word, Power Point, bahkan AutoCad. Yen bisa manfaatke VBA, gaweyan isa luwih ringkes lan luwih cepet.

Conto fungsi ing Excel:
Choose Macro from the Insert Menu, and then choose Module
Type Function followed :

Function Commission(SharesSold, PricePerShare)
TotalSalePrice = SharesSold * PricePerShare
If TotalSalePrice <= 15000 Then
Commission = 25 + 0.03 * SharesSold
Else
Commission = 25 + 0.03 * (0.09 * SharesSold)
End If
End Function

Carane nggunakke: tulis fungsi Commission ing sawajining cell ing worksheet:
You would enter this formula in a cell on your worksheet:

=Commission(100,50)

Tegese, ngitung komisi yen ShareSold = 100 lan PricePerShare = 50
Hasile = 28