நண்பர்களே எக்செல் ஷீட்டில் எண்களின் கூடுதல் எழுத்தால் எழுத ஏதேனும் வழி முறைகள் உள்ளனவா?
நண்பர்களே எக்செல் ஷீட்டில் எண்களின் கூடுதல் எழுத்தால் எழுத ஏதேனும் வழி முறைகள் உள்ளனவா?
அதாவது மொத்தத்தை ஆங்கில எழுத்தில்
12
14
16
--
42
--
Rupees Forty two only
என்று வர வேண்டும் அப்படித்தானே, இது பற்றி முன்னரே மண்டையை உடைத்து ஒரு மேக்ரோ உருவாக்கி வைத்திருக்கிறேன் தமிழ் மன்றத்தில் தந்திருக்கிறேனா என்று நியாபகம் இல்லை. விரைவில் தேடி தருகிறேன்.
முதலில் நீங்கள் கேட்க வந்து அதுவா என்று சொல்லுங்கள்.
இறைவன் நம்மை படைத்ததே, நமக்குள் ஒருவருக்கு ஒருவர் சேவை செய்வதற்கே.
நண்பர் கேட்டது என்னவென்று எனக்கும் தெளிவாகப் புரியவில்லை, பிரவின் நீங்கள் உருவாக்கிய மேக்ரோவினையும் பகிர்ந்து கொள்ளுங்கள்....
பலருக்கும் உபயோகமுள்ளதாக இருக்கும்...
மகள்களைப் பெற்ற அப்பாக்களுக்கு மட்டும் தான் தெரியும்,
முத்தம் - காமத்தில் சேர்ந்ததில்லை என்று
-இயக்குனர் ராம்
ஆம் பிரவீன், நீங்கள் அந்த Macroவை கொடுத்தால் என்னவென்று தெரிந்துவிடும். எனக்கும் தெரிந்துகொள்ள ஆசையாக இருக்கிறது.
நாம் வாழ்கின்ற வாழ்க்கைகு ஒரு அர்த்தம் வேண்டும். குறைந்தபட்சம் ஒரு மரக்கன்றாவது நட்டுவிட்டு செல்லவேண்டும் உனக்கு பிறகு உன் பெயர் சொல்ல.
நான் தேடியவரை எனது சேமிப்பில் தட்டுப்படவில்லை, ஆனால் கூகிளாண்டவர் உடனே இந்த லிங்கை காட்டினார், அதில் உள்ளபடி செய்ததில் நன்றாக வேலை செய்கிறது.
ஆனால் Rupees One thousand ............. and forty eight paise என்று வராமல் one thousand .......... rupess and forty eight paise என்று வருகிறது, கொஞ்சம் மெனக்கெட்டால் நாம் விரும்பும்படி மாற்றி விடலாம்.
இதோ அந்த மாடூயுல்
ஒரு எக்ஸல் சீட்டை திறந்து கொண்டு ALT+F11 ஒரு சேர அழுத்தி Visual Basic Editor திறந்து அதில் Insert menu, சென்று Module கிளிக் செய்து வரும் விண்டோவில் கீழே உள்ளத காப்பி செய்து பின் சேவ் F2 செய்தால் போதும்.
பின் எக்சல் சீட்டில் அந்த தொகை வேண்டும் இடத்தில் =SpellNumber(A1) என்று கொடுத்தால் போதும்.. A1 என்பது அந்த மொத்த தொகை இருக்கும் இடம்.
Type the following code into the module sheet.
நன்றி : டெக்னோ டிப்ஸ் & ட்ரிக்ஸ் பிளாக்.Code:Option Explicit 'Main Function Function SpellNumber(ByVal MyNumber) Dim Rupees, Paise, 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 Paise and set MyNumber to dollar amount. If DecimalPlace > 0 Then Paise = 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 Rupees = Temp & Place(Count) & Rupees If Len(MyNumber) > 3 Then MyNumber = Left(MyNumber, Len(MyNumber) - 3) Else MyNumber = "" End If Count = Count + 1 Loop Select Case Rupees Case "" Rupees = "Zero Rupees" Case "One" Rupees = "One Rupee" Case Else Rupees = Rupees & " Rupees" End Select Select Case Paise Case "" Paise = " and Zero Paise" Case "One" Paise = " and One Paisa" Case Else Paise = " and " & Paise & " Paise" End Select SpellNumber = Rupees & Paise 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
இறைவன் நம்மை படைத்ததே, நமக்குள் ஒருவருக்கு ஒருவர் சேவை செய்வதற்கே.
12
14
16
--
42
--
Rupees Forty two only
என்று வர வேண்டும்
ஆம் நண்பர்களே... என் சந்தேகம் இதுதான்.
நல்லதோர் விடயம்.
வெளிக்கொணர்ந்த பிரவீனிற்கும், அதற்கு உந்துகோலாக இருந்த நடேஷிற்கும் நன்றிகள்.
ஆஹா அருமையான உபயோகமான தகவல்,மிக பயனுள்ளதாக உள்ளது. இதை கொடுத்த நண்பர் பிரவிணுக்கு நன்றி.
தொட்டனைத்தூறும் மணற் கேணி மாந்தருக்கு
கற்றனைத்தூறும் அறிவு
மிக்க நன்றி பிரவீண்... வாழ்த்துக்கள்.
அருமையான மேக்ரோ பிரவீன். நன்றி
அன்புடன்,
ராஜேஷ்
எல்லாம் நன்மைக்கே !
பயனுள்ள தகவல் பிரவீண். பாராட்டுகள்.
பரஞ்சோதி
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks