Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy text from cell to cell with one cell changing text | Excel Worksheet Functions | |||
select text in cell based on text from another cell, paste the text at the begining of a thrid cell, etc... | Excel Programming | |||
Add text in a cell based on colour of text in another cell | Excel Programming | |||
Deleting Rows based on text in cell & formatting cell based on text in column beside it | Excel Programming | |||
extracting text from within a cell - 'text to rows@ equivalent of 'text to columns' | Excel Programming |