Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am trying to file append a phone number in excel with the number format I designate. However when I append the cell to a new file it doesn't include my number format. How can I accomplish this? Cell Value 5552879898 Cell NumberFormat ###-###-#### Cell Value Display in Excel 555-287-9898 File Append Cell Value 5552879898 The following code only makes it appear in excel the way it should. Code: -------------------- Columns("R:R").Select Selection.NumberFormat = "###-###-####" -------------------- Thanks for any help. Scott -- Djmask ------------------------------------------------------------------------ Djmask's Profile: http://www.excelforum.com/member.php...o&userid=24414 View this thread: http://www.excelforum.com/showthread...hreadid=401726 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you are using append to mean concatenate:
=a1&" "&text(a2,"000-000-0000") If you're writing code to append to a file, you could write the formatted string: print #1, format(phonevariable,"000-000-0000") or if you're picking it up from the cell: Print #1, worksheets("sheet1").range("a1").text (only if that cell were formatted correctly.) Djmask wrote: I am trying to file append a phone number in excel with the number format I designate. However when I append the cell to a new file it doesn't include my number format. How can I accomplish this? Cell Value 5552879898 Cell NumberFormat ###-###-#### Cell Value Display in Excel 555-287-9898 File Append Cell Value 5552879898 The following code only makes it appear in excel the way it should. Code: -------------------- Columns("R:R").Select Selection.NumberFormat = "###-###-####" -------------------- Thanks for any help. Scott -- Djmask ------------------------------------------------------------------------ Djmask's Profile: http://www.excelforum.com/member.php...o&userid=24414 View this thread: http://www.excelforum.com/showthread...hreadid=401726 -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thank you Dave, You came up huge. This was the last step in a big process. -- Djmask ------------------------------------------------------------------------ Djmask's Profile: http://www.excelforum.com/member.php...o&userid=24414 View this thread: http://www.excelforum.com/showthread...hreadid=401726 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vlookup to include conditional formats | Excel Worksheet Functions | |||
Mixing number formats in one cell | Excel Discussion (Misc queries) | |||
How do I determine the number of cell formats in this workbook | Excel Discussion (Misc queries) | |||
change ten digits in a cell to include phone # formats | Excel Discussion (Misc queries) | |||
Maximum Number of Cell Formats | Excel Discussion (Misc queries) |