This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub Worksheet_Change(ByVal Target As Range) | |
Dim Z As Long | |
Dim xVal As String | |
On Error Resume Next | |
If Intersect(Target, Range("C8:C100")) Is Nothing Then Exit Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub generateRandNum() | |
'Define your variabiles | |
lowerbound = Range("D22") | |
upperbound = Range("F22") | |
Set randomrange = Range("B24:F43") | |
randomrange.ClearContents | |
For Each rng1 In randomrange | |
counter = counter + 1 | |
Next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'Main Function | |
Function SpellNumberWC(ByVal MyNumber) | |
Dim Dollars, Cents, Temp | |
Dim DecimalPlace, Count | |
ReDim Place(9) As String | |
Place(2) = " Thousand " | |
Place(3) = " Million " | |
Place(4) = " Billion " | |
Place(5) = " Trillion " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'Main Function www.MSOfficeGeek.com | |
Function SpellNumber(ByVal MyNumber, Optional MyCurrency As String = "") | |
Dim Dollars, cents, Temp | |
Dim DecimalPlace, Count | |
ReDim Place(9) As String | |
Place(2) = " Thousand " | |
Place(3) = " Million " | |
Place(4) = " Billion " | |
Place(5) = " Trillion " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'Main Function www.MSOfficeGeek.com | |
Function SpellNumber2(ByVal MyNumber, Optional MyCurrency As String = "") | |
Dim Dollars, Cents, Temp | |
Dim DecimalPlace, Count, x | |
ReDim Place(9) As String | |
Place(2) = " Thousand " | |
Place(3) = " Lacs " | |
Place(4) = " Crores " | |
Place(5) = " Hundred Crores " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* msofficegeek.com Spell Number Indian Rupees | |
* @customfunction | |
*/ | |
function SpellNumberINR(input) { | |
const rupees = Number(parseInt(input, 10)); | |
const output = []; | |
if (rupees === 0) { | |
output.push("zero"); |