Its not easy to create a format for indian currency, but its easy to use a macro which could be able to convert your number into the desired indian currency format.
For using it follow the below steps:
1. Open the sheet on which you want to apply the formatting
2. right click on the sheet tab and select view code
3. paste the below code in the white area
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c
If Target.Cells.Count = 1 Then
Select Case Target.Value
Case Is >= 1000000000
Target.Cells.NumberFormat = "##"",""00"",""00"",""00"",""000.00"
Case Is >= 10000000
Target.Cells.NumberFormat = "##"",""00"",""00"",""000.00"
Case Is >= 100000
Target.Cells.NumberFormat = "##"",""00"",""000.00"
Case Else
Target.Cells.NumberFormat = "##,###.00"
End Select
Else
For Each c In Target
Select Case c.Value
Case Is >= 1000000000
c.NumberFormat = "##"",""00"",""00"",""00"",""000.00"
Case Is >= 10000000
c.NumberFormat = "##"",""00"",""00"",""000.00"
Case Is >= 100000
c.NumberFormat = "##"",""00"",""000.00"
Case Else
c.NumberFormat = "##,###.00"
End Select
Next c
End If
End Sub
Author: Parry
Blog Archive
-
▼
2009
(17)
-
►
February
(14)
- Working with Loops
- Format a Cell
- Assigning Value of a cell to some variable
- Inserting Value in a Cell
- Selecting a cell - VBA Code
- Copy data from 1 column to another
- Loading and Unloading Userform
- Adding Items to Combo Box
- How to Reverse characters of a string
- COUNTING NUMBER OF RECORDS IN SOURCE DATA
- Generate a series of N numbers through user input
- Generating series from 1 to 50
- Adding two numbers through user input
- For adding two numbers and printing the result in ...
-
►
February
(14)
Friday, October 2, 2009
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment