Re: Make a cell value include number formats
- From: Dave Peterson <petersod@xxxxxxxxxxxxxxxx>
- Date: Sun, 04 Sep 2005 00:00:03 -0500
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?action=getinfo&userid=24414
> View this thread: http://www.excelforum.com/showthread.php?threadid=401726
--
Dave Peterson
.
- Follow-Ups:
- Re: Make a cell value include number formats
- From: Djmask
- Re: Make a cell value include number formats
- References:
- Make a cell value include number formats
- From: Djmask
- Make a cell value include number formats
- Prev by Date: pivot table
- Next by Date: Re: For Each x in Range
- Previous by thread: Make a cell value include number formats
- Next by thread: Re: Make a cell value include number formats
- Index(es):