Page 1 of 2 12 LastLast
Results 1 to 12 of 14

Thread: I need formula in excel

  1. #1
    adnanbahrian is offline Advance Member
    Last Online
    29th May 2023 @ 08:21 PM
    Join Date
    08 Aug 2007
    Location
    Karachi
    Age
    41
    Gender
    Male
    Posts
    1,238
    Threads
    421
    Credits
    317
    Thanked
    63

    Default I need formula in excel

    kia excel mayn koi bhe amout jaisay 1,10,000.50 ko words mayn (Rs. One Lac Ten Thousand & Fifty Paisa Only) convert kar sactay hayn ?

  2. #2
    Babaji is offline Senior Member+
    Last Online
    23rd November 2019 @ 12:07 AM
    Join Date
    01 Feb 2009
    Location
    Faisalabad
    Posts
    86
    Threads
    1
    Credits
    930
    Thanked
    0

    Default

    thanks
    Last edited by Babaji; 22nd February 2009 at 11:39 PM.

  3. #3
    Irfanh is offline Senior Member+
    Last Online
    10th June 2021 @ 11:20 PM
    Join Date
    01 Jul 2008
    Age
    39
    Posts
    383
    Threads
    44
    Credits
    1,545
    Thanked: 1

    Default

    Nahi kar sakte

  4. #4
    Join Date
    17 Jan 2009
    Location
    lahore
    Age
    40
    Posts
    141
    Threads
    6
    Credits
    0
    Thanked
    0

    Default

    Salam
    Dosto hum bilkul kr saktay hain,
    computer science main subh kuch ho sakta hai sirf karna ana chahyea.

    1 - Microsoft Excel open karain.
    2 - ALT+F11 presskr Visual Basic Editor open karain.("Tools -> Macro -> Visual Basic Editor" se direct open b ho sakta hai)
    3 - Insert menu main Module per click karain.
    4 - Nechay dia gia code module sheet main copy paste kr dain

    '------------------------------------------------
    Option Explicit
    'Main Function
    Function SpellNumber(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 "
    ' String representation of amount.
    MyNumber = Trim(Str(MyNumber))
    ' Position of decimal place 0 if none.
    DecimalPlace = InStr(MyNumber, ".")
    ' Convert cents and set MyNumber to dollar amount.
    If DecimalPlace > 0 Then
    Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
    "00", 2))
    MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
    End If
    Count = 1
    Do While MyNumber <> ""
    Temp = GetHundreds(Right(MyNumber, 3))
    If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
    If Len(MyNumber) > 3 Then
    MyNumber = Left(MyNumber, Len(MyNumber) - 3)
    Else
    MyNumber = ""
    End If
    Count = Count + 1
    Loop
    Select Case Dollars
    Case ""
    Dollars = "No Rupees"
    Case "One"
    Dollars = "One Rupee"
    Case Else
    Dollars = Dollars & " Rupees"
    End Select
    Select Case Cents
    Case ""
    Cents = " and No Paisa"
    Case "One"
    Cents = " and One Paisa"
    Case Else
    Cents = " and " & Cents & " Paisa"
    End Select
    SpellNumber = Dollars & Cents
    End Function

    ' Converts a number from 100-999 into text
    Function GetHundreds(ByVal MyNumber)
    Dim Result As String
    If Val(MyNumber) = 0 Then Exit Function
    MyNumber = Right("000" & MyNumber, 3)
    ' Convert the hundreds place.
    If Mid(MyNumber, 1, 1) <> "0" Then
    Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
    End If
    ' Convert the tens and ones place.
    If Mid(MyNumber, 2, 1) <> "0" Then
    Result = Result & GetTens(Mid(MyNumber, 2))
    Else
    Result = Result & GetDigit(Mid(MyNumber, 3))
    End If
    GetHundreds = Result
    End Function

    ' Converts a number from 10 to 99 into text.
    Function GetTens(TensText)
    Dim Result As String
    Result = "" ' Null out the temporary function value.
    If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
    Select Case Val(TensText)
    Case 10: Result = "Ten"
    Case 11: Result = "Eleven"
    Case 12: Result = "Twelve"
    Case 13: Result = "Thirteen"
    Case 14: Result = "Fourteen"
    Case 15: Result = "Fifteen"
    Case 16: Result = "Sixteen"
    Case 17: Result = "Seventeen"
    Case 18: Result = "Eighteen"
    Case 19: Result = "Nineteen"
    Case Else
    End Select
    Else ' If value between 20-99...
    Select Case Val(Left(TensText, 1))
    Case 2: Result = "Twenty "
    Case 3: Result = "Thirty "
    Case 4: Result = "Forty "
    Case 5: Result = "Fifty "
    Case 6: Result = "Sixty "
    Case 7: Result = "Seventy "
    Case 8: Result = "Eighty "
    Case 9: Result = "Ninety "
    Case Else
    End Select
    Result = Result & GetDigit _
    (Right(TensText, 1)) ' Retrieve ones place.
    End If
    GetTens = Result
    End Function

    ' Converts a number from 1 to 9 into text.
    Function GetDigit(Digit)
    Select Case Val(Digit)
    Case 1: GetDigit = "One"
    Case 2: GetDigit = "Two"
    Case 3: GetDigit = "Three"
    Case 4: GetDigit = "Four"
    Case 5: GetDigit = "Five"
    Case 6: GetDigit = "Six"
    Case 7: GetDigit = "Seven"
    Case 8: GetDigit = "Eight"
    Case 9: GetDigit = "Nine"
    Case Else: GetDigit = ""
    End Select
    End Function

  5. #5
    Join Date
    17 Jan 2009
    Location
    lahore
    Age
    40
    Posts
    141
    Threads
    6
    Credits
    0
    Thanked
    0

    Default

    abh ap kisi cell main is function ko call kr lain
    is tarha

    =SpellNumber(124.50)

    to ye ap ko "One hundred twenty four rupees and fifity paisa" return kr day

    abh ap is ko apni zaroorat k mutabik use kr saktay hain,

    koi masla ho to bta daina.

  6. #6
    Yaseen Aslam is offline Junior Member
    Last Online
    12th May 2011 @ 01:41 PM
    Join Date
    01 Apr 2007
    Age
    52
    Posts
    17
    Threads
    5
    Credits
    1,000
    Thanked
    0

    Default Man Gay Ustad

    Bhai Man Gai Ustad
    Bohat Shukariya

  7. #7
    sajidbagi is offline Senior Member+
    Last Online
    1st February 2023 @ 06:54 PM
    Join Date
    04 Jan 2009
    Posts
    225
    Threads
    20
    Credits
    1,200
    Thanked
    5

    Default

    zabardast

  8. #8
    Join Date
    17 Jan 2009
    Location
    lahore
    Age
    40
    Posts
    141
    Threads
    6
    Credits
    0
    Thanked
    0

    Default

    thanx brothers

  9. #9
    Mazhar Khan's Avatar
    Mazhar Khan is offline Senior Member+
    Last Online
    26th July 2020 @ 12:44 AM
    Join Date
    25 Feb 2009
    Posts
    47
    Threads
    6
    Credits
    1,225
    Thanked: 1

    Default

    wow great yaar you are geneous

  10. #10
    usman is offline Senior Member+
    Last Online
    31st August 2023 @ 01:06 AM
    Join Date
    31 Dec 2005
    Posts
    447
    Threads
    23
    Credits
    0
    Thanked
    7

    Default

    very nice sharing

  11. #11
    Raish is offline Junior Member
    Last Online
    10th June 2010 @ 03:59 PM
    Join Date
    08 Apr 2009
    Age
    39
    Posts
    29
    Threads
    4
    Credits
    837
    Thanked: 1

    Default

    Quote imran_saqi said: View Post
    abh ap kisi cell main is function ko call kr lain
    is tarha

    =SpellNumber(124.50)

    to ye ap ko "One hundred twenty four rupees and fifity paisa" return kr day

    abh ap is ko apni zaroorat k mutabik use kr saktay hain,

    koi masla ho to bta daina.
    Dear i have applied same formula but when i reopen the file after saving it doesnt show the result.Following is the error:

    #NAME?

  12. #12
    FritZie's Avatar
    FritZie is offline Senior Member+
    Last Online
    5th March 2015 @ 01:46 AM
    Join Date
    21 Aug 2009
    Gender
    Male
    Posts
    21,919
    Threads
    377
    Credits
    935
    Thanked
    1803

    Default

    Old Thread.....
    No Need Replies...

Page 1 of 2 12 LastLast

Similar Threads

  1. Excel tip (Hidde formula in formula bar in excel)
    By Honour12 in forum Urdu Tutorials & Designing
    Replies: 14
    Last Post: 31st May 2016, 10:06 AM
  2. Excel formula
    By naeemshahzad in forum Ask an Expert
    Replies: 0
    Last Post: 22nd March 2015, 12:22 PM
  3. Excel Formula Help
    By adnanmomin in forum Ask an Expert
    Replies: 4
    Last Post: 31st May 2013, 06:38 PM
  4. help a Excel formula
    By Ameen Asim in forum Ask an Expert
    Replies: 0
    Last Post: 6th May 2012, 04:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •