[Solved] Adding text to the beginning of every cell?

Discuss the spreadsheet application

[Solved] Adding text to the beginning of every cell?

Postby gcz » Mon Jan 25, 2010 8:19 am

Hi,

How can I add the same text to the beginning of multiple cells under one column (A1:A400)? Currently I have websites listed in simple address (i.e example.net) and I need to add "http://" to the beginning of all the addresses. There's a few hundred of them so adding the text manually is a bit too labourous.

Thanks in advance for any help!
Last edited by Hagar Delest on Tue Jan 26, 2010 4:42 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 3.1.1 on Windows XP
gcz
 
Posts: 2
Joined: Mon Jan 25, 2010 8:10 am

Re: Adding text to the beginning of every cell?

Postby vasa1 » Mon Jan 25, 2010 9:00 am

gcz wrote:Hi,

How can I add the same text to the beginning of multiple cells under one column (A1:A400)? Currently I have websites listed in simple address (i.e example.net) and I need to add "http://" to the beginning of all the addresses. There's a few hundred of them so adding the text manually is a bit too labourous.

Thanks in advance for any help!


First, insert an additional column (alt, i, l) to the left of column A. Your stuff is now in column B.
Then, in the first cell (A1) type what you want to add at the beginning: in this case, http://. Then copy and paste down as far as you have content in column B. (added in edit :oops: )

Next go to cell C1 and type =concatenate(A1; B1) and hit enter. You should see what you want in cell C1.
Then copy the contents of C1 and paste down as far as you need.

If you are finished, you can select column C, copy, and then paste special: here uncheck paste all, but check numbers and uncheck formulas and hit enter. Then you can delete columns A and B.
LibreOffice 3.5.3.2 on Ubuntu 12.04
vasa1
 
Posts: 254
Joined: Sat Dec 26, 2009 1:20 pm
Location: Bombay

Re: Adding text to the beginning of every cell?

Postby JohnV » Mon Jan 25, 2010 7:00 pm

Or select the cells involved and use Find & Replace.
Search = (.*)
Replace = http://$1
Click More Options, check "Current selection only" and "Regular expressions". Do Replace All.
JohnV
Volunteer
 
Posts: 1509
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA

Re: Adding text to the beginning of every cell?

Postby gcz » Tue Jan 26, 2010 1:59 pm

Thanks a lot, both methods work great!
OpenOffice 3.1.1 on Windows XP
gcz
 
Posts: 2
Joined: Mon Jan 25, 2010 8:10 am

Re: [Solved] Adding text to the beginning of every cell?

Postby tapas » Fri Aug 02, 2013 8:33 am

Thanks a lot just registered to say thanks. Both method are good and the 2nd method is best.
OpenOffice 2.4 on Ubuntu 10.04
Thanks and regards,
Tapas
tapas
 
Posts: 1
Joined: Fri Aug 02, 2013 8:24 am


Return to Calc

Who is online

Users browsing this forum: Google [Bot] and 28 guests