OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Adding prefix to a column.

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
paulketil
Newbie
Newbie


Joined: 03 Feb 2010
Posts: 2

PostPosted: Wed Feb 03, 2010 9:19 am    Post subject: Adding prefix to a column. Reply with quote

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
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Feb 03, 2010 9:32 am    Post subject: Reply with quote

IF(ISNUMBER(A1);TEXT(A1;"000-000-0000-00");A1)
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
stevesaunders
OOo Advocate
OOo Advocate


Joined: 26 Dec 2009
Posts: 408

PostPosted: Wed Feb 03, 2010 2:14 pm    Post subject: Format cells Reply with quote

select the column / Format / Cells / Numbers / Text
_________________
Steve ~ Tennessee USA
Mac OS X 10.6.2 Open Office 3.1
Back to top
View user's profile Send private message
paulketil
Newbie
Newbie


Joined: 03 Feb 2010
Posts: 2

PostPosted: Wed Feb 03, 2010 11:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Feb 03, 2010 11:36 pm    Post subject: Reply with quote

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 https://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group