Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Copying and pasting/formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mineralistic - 24 Jan 2006 17:50 GMT
I am dealing with database lists of hundreds of items, and one thin
that slows me down is having to paste the same URL in front of eac
individual number for each item. The numbers are not completel
consectutive (i.e. 1, 3, 4, 6, etc.). I am wondering if there's a wa
to copy a string of text, and then select a number of cells, and past
the string -in front- of whatever text is within those cells.

Any help is appreciated, thanks
Gord Dibben - 24 Jan 2006 19:14 GMT
Assuming numbers are in Column A.

In B1 enter  ="stringtoadd" & A1

Double-click on the fill handle to copy down as far as you have data in Column A

When happy, copy column B and Paste Special(in place)>Values>OK>Esc.

Delete Column A.

VBA Macro......select column A and run the macro.

Sub Add_Text_Left()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
   On Error GoTo endit
   Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
           .SpecialCells(xlCellTypeConstants, xlTextValues)
   moretext = InputBox("Enter your Text")
   For Each cell In thisrng
       cell.Value = moretext & cell.Value
   Next
   Exit Sub
endit:
   MsgBox "only formulas in range"
End Sub

Gord Dibben  MS Excel MVP

>I am dealing with database lists of hundreds of items, and one thing
>that slows me down is having to paste the same URL in front of each
[quoted text clipped - 4 lines]
>
>Any help is appreciated, thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.