Hi Mikey!
Here are some custom currency formats originally posted by Bill
Manville.
Rupees with Paise
[>9999999]"Rs."##\,##\,##\,##\,##0.00;[>99999]"Rs."##\,##\,##0.00;"Rs."##,##000
Rupees without Paise
[>9999999]"Rs."##\,##\,##\,##\,##0;[>99999]"Rs."##\,##\,##0;"Rs."##,##0
Rupees without Rs. notation
[>9999999]##\,##\,##\,##0.00;[>99999]"##\,##\,##0.00;"##,##0.00
And here's a worksheet_change event handler that covers negative
numbers as well:
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Intersect(Target, Range("A1:A20")) Is Nothing Then
Exit Sub
End If
With Target
Select Case Len(Abs(Int(.Value)))
Case Is <= 3
.NumberFormat = "###.00;(###.00)"
Case Is <= 5
.NumberFormat = "##,###.00;(##,###.00)"
Case Is <= 7
.NumberFormat = "#\,##\,###.00;(#\,##\,###.00)"
Case Is <= 9
.NumberFormat = "#\,##\,##\,###.00;(#\,##\,##\,###.00)"
Case Is <= 11
.NumberFormat = "#\,##\,##\,##\,###.00;(#\,##\,##\,##\,###.00)"
End Select
End With
End Sub