Posts

Showing posts from March, 2018

Excel - Data Validation

Image
Introduction Data validation is a feature in Excel used to control what a user can enter into a cell. For example, you could use data validation to make sure a value is a number between 1 and 6, make sure a date occurs in the next 30 days, or make sure a text entry is less than 25 characters. Data validation can simply display a message to a user telling them what is allowed as shown below: Data validation can also stop invalid user input. For example, if a product code fails validation, you can display a message like this: In addition, data validation can be used to present the user with a predefined choice in a dropdown menu: This can be a convenient way to give a user exactly the values that meet requirements. Data validation controls Data validation is implemented via rules defined in Excel's user interface on the Data tab of the ribbon. Important limitation It is important to understand that data validation can be easily defeated. If a user copies d

Convert Number to Words Currency in MS Word

Image
Convert Number to Words Currency in MS Word Step 1: Enable Developer Tab In MS Word If you can't see the developer tab as like in the below picture, Go to File -> Options -> Customize Ribbon -> Check on 'Devloper' under Main Tabs heading, Step 2: Add the Module Code Click on the Visual Basic option in the Developer Ribbon. Right click on the 'Project' title and Insert -> Module Copy and paste the below code in code window of the Module ---------------- Sub ConvertCurrencyToEnglish ( ) ' MyNumber = Val ( Selection. Text ) Dim Temp Dim Rupees, Paise Dim DecimalPlace, Count ReDim Place ( 9 ) As String Place ( 2 ) = " Thousand " Place ( 3 ) = " lakh " Place ( 4 ) = " Crore " ' Convert MyNumber to a string, trimming extra spaces. MyNumber = Trim ( S