• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Converting numbers to Lacs

somnath6309

New Member
Dear Sir/ Madam,

all we are familiar with custom number formatting. To display a certain number e.g. 25,12,000 as rupees in thousand we can have this formatting : #,##0, or to show the same in ten lacs (ie. as if divided by 1000000) we have to write #,##0,,.

My question is is there any way to display rupees in Lacs? i.e. the number will be shown as if it is divided by 100000 = 25.12 ? IS IT POSSIBLE IN EXCEL CUSTOM NUMBER FORMATS?
 
Hi Somnath,
Your question seems a bit unclear to me..
Do you need a formula to do that, or you mean you are want the figures to have a comma placed after 2 digits(indian Sytle of numbering) which is usually after every3 digits (US style)?

Or is it something else?
 
If you want auto conversion of the entered number in Lac e.g. if you enter 123456 it should be converted to 1.23
Then it can achieved by pasting following VBA code to excel worksheet:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 1 And Target.Column <> 2 Then Exit Sub
If IsNumeric(Target.Value) = False Then Exit Sub
If Target.Value = "" Then Exit Sub
Application.EnableEvents = False
Target.Value = Round((Target.Value / 100000), 2)
Application.EnableEvents = True
End Sub

The code will change any number entered in column A and B to Lac in two decimal figures. Hope this is what you want.
 
Back
Top