Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
But when that str(1234) hits A1 (and A1 is formatted as General), then A1 will
still be a number. You could force it to be text: Range("A1") = "'1234" (included the leading apostrophe) or you could format the cell as Text first. with range("a1") .numberformat = "@" .value = 1234 end with Leith Ross wrote: Hello ACFalcon. You can convert a number in VBA to a string by using the STR function. EXAMPLE: Range("A1") = Str(1234) The value in A1 is now text and not a number. As for the Format statement changing a cell's type, the answer is no. All cells are Variant data types. Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=493932 -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert numbers from text format to number format | Excel Discussion (Misc queries) | |||
Change number (in text format) to numeric format | Excel Discussion (Misc queries) | |||
How to change text format .126 to number format 0.126 ? | Excel Worksheet Functions | |||
convert text-format number to number in excel 2000%3f | Excel Discussion (Misc queries) | |||
How do i change numbers in text format to number format? | New Users to Excel |