View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Automation of Keystrokes in Populated Cells.

You could select the cells and run this macro.

Sub Test
dim myRange as range
Dim r as range

set myRange = Selection

for each r in myrange
r.value = "'" & r.text
next r

End sub
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Aldini" wrote:

I am seeking a way, using an Excel macro, to automatically edit a collection
of cells in the following way.
{F2} {Home} " ' " {Enter}
Of course if there is a better way, I would be happy to learn that also.
The issue is that I repeatedly copy data from a website data page, and paste
it into an Excel 2000 spreadsheet. One of the collumns of data needs to be
handled as text, but the characters a nn-nnn/nn
where "n" is a number. When Excel in any way processes the characters as
numbers, then the cell ceases to be informative of the intended label.
Thanks