STAY HOME! STAY SaVE

Techies Net
  • Home
  • Software
    • Dotiny
  • Web & App Development
    • Website Builder
    • App Development
  • Request Review
  • Advertise
  • Mobile App
  • Contact Us

How Microsoft Excel Function Can Be Custom Made?

11/2/2015

0 Comments

 
As you are aware Microsoft products always use Visual Basic that you can use in Microsoft Word, Access, and Excel. Although Microsoft Excel includes a huge number of built-in worksheet functions, it doesn't have a function for every type of calculation you perform. Microsoft Excel has  incidentally the provision to create custom-made functions as well.
Custom function
It will be appreciated that Excel designers could not possibly make provisions for every calculation in terms of different needs of individual users. This tutorial therefore aims at showing how one can make a custom-made function in Microsoft excel through the use of Visual Basic. Visual Basic fortunately is one the easiest program languages ever made. It allows you to stop a running program and make changes, then let it keep running. The purpose of user-made functions is to allow the user to create a custom-made function that is not already included in the list of functions coming with Microsoft Excel pack. A function can perform a calculation that yields either a value or text to the specified cell.
When you enter a simple formula, it obviously begins with an equal sign (=), followed by constants. For example: =5+2*3 in an Excel sheet multiplies the last two digits and adds the first one to the result, following the standard order of mathematical operations, i.e. -multiplication is performed before addition.

Steps: How to write a custom-made function in excel.

  •  First of all to use Visual Basic in Excel, you have to enable the Developer Menu.  Simply go to the option under General Options>Customize Ribbon>Developer.
Enabling options
  • Create an Excel file on desktop and if you want to use custom-made functions in  the created Excel-sheet, you have to save the spreadsheet as an .xlsm file. If you  do not save in such a format, you would get this warning image as shown below.
File saving format
warning message
  • Now, to create a custom-made Excel function, go to the Developers menu, and click on Visual Basic. When you click on the Visual Basic option the screen may look like the second image indicated below.
Visual basic
Project -VBA
  • Please right-click the Microsoft Excel Object, and select Insert Module. 
Insert Module
  • At this stage, you get an empty screen to write your functions on. You can learn the language if you are not much familiar with, but we would show you the basic format that are  usually followed.

Function myFunction (arguments) return type
myFunction = some_calculation
End Function
There is no return statement as with other languages  and  there is no compile step either.
Picture
  • Please type your logic here, and then save the spreadsheet as an .xlsm file.  In the example mentioned below, the function is identified as Commission. We used number type double as that allows decimal points.  You can also indicate these declarations as VB, because the visual basic programming language allows you to do that.
Picture
  • Now you can start using your function in the spreadsheet. Just reference it like you would for any other function.
Excel Sheet
  • The resulting calculation will be your Commission.
Final commission

Author : Abdul Razzak

Abdul Razzak
Designation: Associate Blogger
Bio: Abdul Razzak is one of the top students of Mahatma Gandhi University with excellent GPA throughtout its graduation. He is passionate towards network topology management and highly challenged troubleshooting issues. Come and meet him here.

Share This Post




0 Comments



Leave a Reply.

    Get Updates Via Email

    Enter Email Address

    7:00 AM - 9:00 AM IST

    Blog Sponsors


    Category

    All
    Apps
    Camera
    Cars Bikes
    Cloud
    Computers
    Earn Easy Money
    Education
    Entertainment
    Fun
    Games
    How To
    Innovation
    Mobile
    News Internet
    News Internet47f3cea023
    News Internet769585a1ca
    News Of Internet
    News Of Internet
    SmartBand
    Smartwatch
    Software
    Technology

    Archives

    January 2019
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    December 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012
    July 2012
    June 2012
    May 2012
    April 2012
    March 2012
    February 2012
    January 2012
    December 2011
    November 2011
    October 2011
    September 2011
    August 2011
    July 2011
    June 2011
    May 2011
    April 2011
    March 2011
    February 2011

Contact Us

Email: [email protected]

Stay Connected

Download Our Mobile App 

Techies Net Mobile App
Copyright © 2011-2019 Techies Net | Our Logo | Advertise | Careers | Donate Us | All Right Reserved.
All the trademarks are sole property of their respective owners.

Powered By HostChef.In

  • Home
  • Software
    • Dotiny
  • Web & App Development
    • Website Builder
    • App Development
  • Request Review
  • Advertise
  • Mobile App
  • Contact Us