Ask Your Question
0

convert numbers into english text

asked 2017-03-21 06:19:59 +0200

neha gravatar image

i want indian rupees written in numbers(figures) to be converted in to english(india) text/ words please help me know the function for this ( eg in excel the function is spellnumber() or spellcur())

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
1

answered 2017-03-21 10:21:09 +0200

m.a.riosv gravatar image
edit flag offensive delete link more
0

answered 2017-03-21 08:26:15 +0200

There's no spellnumber function in Excel, only macros that are available on Internet using search.

You may use the answer accepted here.

edit flag offensive delete link more
0

answered 2017-03-21 08:33:55 +0200

OregonJohn gravatar image

Create a macro. For each number replace with text. Select a range of cells to run the macro on, then run the macro.

From OpenOffice forum thread Loop through a selected range of cells and

Sub Learn2
Dim myController as Object, myRange as Object
Dim newRange(0, 0)
Dim Tmp as Integer
Dim i, j, col, row

myController = ThisComponent.getCurrentController()
myRange = myController.getSelection().getDataArray()
Redim newRange(UBound(myRange, 1), UBound(myRange(0), 1))
row = 0
col = 0
For row = 0 to UBound(myRange, 1)
    For col = 0 to UBound(myRange(0), 1)
        newRange(row, col) = myRange(row)(col) * 2
    Next col
Next row
myController.getSelection().setDataArray(newRange)

End Sub

Look for the line

newRange(row, col) = myRange(row)(col) * 2

That is where you would put your replacement values.

Look at libreoffice.org ... if...then...else to create the replacement values.

Just off the top of my head (probably wrong code though)

If newRange(row, col) = 1 then newRange(row, col) = "some kind of text"
If newRange(row, col) = 2 then newRange(row, col) = "otherkind of text"

Hope this helps. John.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2017-03-21 06:19:59 +0200

Seen: 1,886 times

Last updated: Mar 21 '17