Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Is it possible to add a text with number using vba and format that number to "[$-2000000]#0" Something like Range("A1")= "Sample Text " & format(12345, "[$-2000000]#0") If add 12345 to Range A1 and say Range("A1").numberformat="[$-2000000]#0" then it works properly Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Format doesn't seem to recognize that format, but this is close:
Sub AAA() s = "This is sample text: " For i = 1 To 5 s = s & ChrW(1776 + i) Next ActiveCell.Value = s ActiveCell.Characters(22, 5).Font.Name = "Lucidia Sans Unicode" End Sub Change Lucidia Sans Unicode to a Unicode font on your system. I don't know the arabic symbols, so this didn't exactly match what the number format produces for the numbers 4 and 5. 1, 2 and 3 seemed to match. Maybe you can see how to correct it. -- Regards, Tom Ogilvy "Abdul" wrote in message oups.com... Hello, Is it possible to add a text with number using vba and format that number to "[$-2000000]#0" Something like Range("A1")= "Sample Text " & format(12345, "[$-2000000]#0") If add 12345 to Range A1 and say Range("A1").numberformat="[$-2000000]#0" then it works properly Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Excel 2003 on Windows XP, Arial appears to be unicode, so you don't need
the last line if yours is unicode (there used to be a special Arial Unicode font in Windows 98 and maybe 2000 as I recall): Sub AAA() s = "This is sample text: " For i = 1 To 5 s = s & ChrW(1776 + i) Next ActiveCell.Value = s End Sub -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Format doesn't seem to recognize that format, but this is close: Sub AAA() s = "This is sample text: " For i = 1 To 5 s = s & ChrW(1776 + i) Next ActiveCell.Value = s ActiveCell.Characters(22, 5).Font.Name = "Lucidia Sans Unicode" End Sub Change Lucidia Sans Unicode to a Unicode font on your system. I don't know the arabic symbols, so this didn't exactly match what the number format produces for the numbers 4 and 5. 1, 2 and 3 seemed to match. Maybe you can see how to correct it. -- Regards, Tom Ogilvy "Abdul" wrote in message oups.com... Hello, Is it possible to add a text with number using vba and format that number to "[$-2000000]#0" Something like Range("A1")= "Sample Text " & format(12345, "[$-2000000]#0") If add 12345 to Range A1 and say Range("A1").numberformat="[$-2000000]#0" then it works properly Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell that is formated for Date shows a diffrent number | Excel Discussion (Misc queries) | |||
If Statement - With Formated text | Excel Worksheet Functions | |||
need to force PT to use formated number | Excel Worksheet Functions | |||
How do I convert a number formated as a date to text in Excel? | Excel Discussion (Misc queries) | |||
Copying Formated Text | Excel Programming |