Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Want $1 to appear in a cell - Text


I want to have "$1" appear in the cell. This is how I formatted the cell

..Range(currRow, currColumn).NumberFormat = "Text"

..Range(currRow, currColumn).Value = "$1"



When I view the contents of the cell it shows

T1900xt



What is going on? How can I get "$1" to appear in the cell





Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Want $1 to appear in a cell - Text

Range(currRow, currColumn).NumberFormat = "@"

--
HTH

Bob

(change the xxxx to gmail if mailing direct)
"Henry Jones" wrote in message
...

I want to have "$1" appear in the cell. This is how I formatted the cell

.Range(currRow, currColumn).NumberFormat = "Text"

.Range(currRow, currColumn).Value = "$1"



When I view the contents of the cell it shows

T1900xt



What is going on? How can I get "$1" to appear in the cell





Thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Want $1 to appear in a cell - Text

Thanks for the info, the results are better but not exactly what I want.
The cell now has a "1" in it without the dollar sign. I would like to keep
the dollar sign. I also noticed that the cell is left justified, so it
seems it isn't stored as a number, but a character.

H

"Bob Phillips" wrote in message
...
Range(currRow, currColumn).NumberFormat = "@"

--
HTH

Bob

(change the xxxx to gmail if mailing direct)
"Henry Jones" wrote in message
...

I want to have "$1" appear in the cell. This is how I formatted the cell

.Range(currRow, currColumn).NumberFormat = "Text"

.Range(currRow, currColumn).Value = "$1"



When I view the contents of the cell it shows

T1900xt



What is going on? How can I get "$1" to appear in the cell





Thanks






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Want $1 to appear in a cell - Text

Actually it's coming in through SQL programatically and it was entered into
Excel through a SyncFusion control (first time I tried it) and the command
used to store the data was:
worksheet.Range(currRow, currColumn).Value =
drow(dcolumn.ColumnName).ToString.Trim



but when I changed the .Value to .Text, it worked. I changed the
NumberFormat to "@" and to "General" and to "Text" but it still didn't work
until I changed the range to .Text. But you are right, I should have
provided more information on where the data was coming from. I just thought
it was a formatting issue.



Thanks,



Henry



"JLGWhiz" wrote in message
...
Since this is your second posting of this problem, maybe you could provide
some more information. Are you typing the data into the cells or is it
being
entered programmatically through SQL or other means? Are all cells in the
used range doing the same thing or is it just one cell in the range? Do
you
have code that copies data from a cell that is formatted differently from
the
problem cell you are
pasting to? You know, a few things that will help us understand how the
data is being obtained and handled.
"Henry Jones" wrote:

Thanks for the info, the results are better but not exactly what I want.
The cell now has a "1" in it without the dollar sign. I would like to
keep
the dollar sign. I also noticed that the cell is left justified, so it
seems it isn't stored as a number, but a character.

H

"Bob Phillips" wrote in message
...
Range(currRow, currColumn).NumberFormat = "@"

--
HTH

Bob

(change the xxxx to gmail if mailing direct)
"Henry Jones" wrote in message
...

I want to have "$1" appear in the cell. This is how I formatted the
cell

.Range(currRow, currColumn).NumberFormat = "Text"

.Range(currRow, currColumn).Value = "$1"



When I view the contents of the cell it shows

T1900xt



What is going on? How can I get "$1" to appear in the cell





Thanks









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy text from cell to cell with one cell changing text Bobby Excel Worksheet Functions 5 March 15th 07 11:09 PM
select text in cell based on text from another cell, paste the text at the begining of a thrid cell, etc... jsd219 Excel Programming 0 October 19th 06 05:04 PM
Add text in a cell based on colour of text in another cell Ian Richardson ACITP Excel Programming 3 July 24th 06 04:34 PM
Deleting Rows based on text in cell & formatting cell based on text in column beside it Steve Excel Programming 4 February 26th 04 03:31 PM
extracting text from within a cell - 'text to rows@ equivalent of 'text to columns' Dan E[_2_] Excel Programming 4 July 30th 03 06:43 PM


All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"