View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Satnam Randhawa[_2_] Satnam Randhawa[_2_] is offline
external usenet poster
 
Posts: 6
Default add leading character

I have selected the cells but its showing an error in the code when i try to
write it in the macro..

"Gary''s Student" wrote:

Make sure you run it from the worksheet and select the cells first
--
Gary''s Student - gsnu200763


"Satnam Randhawa" wrote:

doesnt work...
any other suggestions?

"Gary''s Student" wrote:

Select the cells you want to process and run this:

Sub quote_me()
apos = Chr(39)
For Each r In Selection
r.Value = apos & r.Text
Next
End Sub

--
Gary''s Student - gsnu200763


"Satnam Randhawa" wrote:

I have a column of numbers to which I want to add a leading apostrophe. how
do i do it in one go?