Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I recorded a macro that I thought would format column f as
text, and it records as shown below: Columns("F:F").NumberFormat = "@" It works for several columns, but it doesn't work in this particular column. If you get in a cell beside it and issue the following formula: =istext(f2); the result is false, telling you that the result is not text. What can I do to change this to make it be text instead of numeric? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ISTEXT won't return true just because the cell is formatted as text. It
only will return true if you have a value in the cell. If you put a value in the cell, then since it was preformatted as text, the value will be stored as text and the function will return true. -- Regards, Tom Ogilvy "Bruce Roberson" wrote in message ... I recorded a macro that I thought would format column f as text, and it records as shown below: Columns("F:F").NumberFormat = "@" It works for several columns, but it doesn't work in this particular column. If you get in a cell beside it and issue the following formula: =istext(f2); the result is false, telling you that the result is not text. What can I do to change this to make it be text instead of numeric? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was doing the istext to confirm the fact that it truly
wasn't text. When I did a file, save as xyz.dbf (for database), then when I tried to append to a database file that depended on that column F being a text field, the append operation did not accept it because the column was numeric rather than text. So the questions remains: Is their another way to make this column of numeric values convert to text ? I could probably write a loop that would go to each cell, and put an ' (apostrophe) in front of the numbers and that would undoubtedly do it. However, I was just looking for a better alternative since this column must be a text field when appending to this database I am using. -----Original Message----- ISTEXT won't return true just because the cell is formatted as text. It only will return true if you have a value in the cell. If you put a value in the cell, then since it was preformatted as text, the value will be stored as text and the function will return true. -- Regards, Tom Ogilvy "Bruce Roberson" wrote in message ... I recorded a macro that I thought would format column f as text, and it records as shown below: Columns("F:F").NumberFormat = "@" It works for several columns, but it doesn't work in this particular column. If you get in a cell beside it and issue the following formula: =istext(f2); the result is false, telling you that the result is not text. What can I do to change this to make it be text instead of numeric? . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you put in a dummy row with AAAA in the cell for that column, it will be
text. That always works for me when I am saving as DBF. -- Regards, Tom Ogilvy wrote in message ... I was doing the istext to confirm the fact that it truly wasn't text. When I did a file, save as xyz.dbf (for database), then when I tried to append to a database file that depended on that column F being a text field, the append operation did not accept it because the column was numeric rather than text. So the questions remains: Is their another way to make this column of numeric values convert to text ? I could probably write a loop that would go to each cell, and put an ' (apostrophe) in front of the numbers and that would undoubtedly do it. However, I was just looking for a better alternative since this column must be a text field when appending to this database I am using. -----Original Message----- ISTEXT won't return true just because the cell is formatted as text. It only will return true if you have a value in the cell. If you put a value in the cell, then since it was preformatted as text, the value will be stored as text and the function will return true. -- Regards, Tom Ogilvy "Bruce Roberson" wrote in message ... I recorded a macro that I thought would format column f as text, and it records as shown below: Columns("F:F").NumberFormat = "@" It works for several columns, but it doesn't work in this particular column. If you get in a cell beside it and issue the following formula: =istext(f2); the result is false, telling you that the result is not text. What can I do to change this to make it be text instead of numeric? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
wrap text multiple column with format | Excel Discussion (Misc queries) | |||
Column with currency & text - how to format? | Excel Discussion (Misc queries) | |||
How to sum a column of hours & minutes in format TEXT(C5-B5,"h:mm" | Excel Worksheet Functions | |||
How can I format text in a column on a landscape worksheet? | Excel Worksheet Functions | |||
column format as text | Excel Programming |