| View previous topic :: View next topic |
| Author |
Message |
paulketil Newbie

Joined: 03 Feb 2010 Posts: 2
|
Posted: Wed Feb 03, 2010 9:19 am Post subject: Adding prefix to a column. |
|
|
I am going to copy some lists in to a database, and i have a column that consists of both numbers and text.
I want to add a prefix to that column and force the column to text format.
Have been searching the forum but cant find any solution for my problem.
Ex.
"123-1234-45"(Number format) ===> "112-123-1234-45"' (Text format)
"ADE-123-FG" (Text format) ===> "112-ADE-123_FG" (Text format)
BRG
Paul Ketil |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Wed Feb 03, 2010 9:32 am Post subject: |
|
|
IF(ISNUMBER(A1);TEXT(A1;"000-000-0000-00");A1) _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
stevesaunders OOo Advocate


Joined: 26 Dec 2009 Posts: 408
|
Posted: Wed Feb 03, 2010 2:14 pm Post subject: Format cells |
|
|
select the column / Format / Cells / Numbers / Text _________________ Steve ~ Tennessee USA
Mac OS X 10.6.2 Open Office 3.1 |
|
| Back to top |
|
 |
paulketil Newbie

Joined: 03 Feb 2010 Posts: 2
|
Posted: Wed Feb 03, 2010 11:25 pm Post subject: |
|
|
Thank you Villeroy!
After some testing i found uot about it.
My solution vas:
IF(ISNUMBER(A1);TEXT(A1;"################");A1)
And after converting all cells to text i formatted the column "110-@"
Are there any way to add the prefix in the formula both for tekst and number cells?
PK |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Wed Feb 03, 2010 11:36 pm Post subject: |
|
|
A contanation gives text in any case:
="110-@"&A1
| stevesaunders wrote: | | select the column / Format / Cells / Numbers / Text |
Nonsense. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
|