[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Rebecca Plumridge

12/20/2006 6:13:00 AM

I have an entire worksheet that I now need to add " (an apostrophe) to the
start of each cell and " to the end of it to enclose the text within. Is it
possible to create a macro for this?

Any help would be greatly appreciated.

Thanks
1 Answer

an01digital

12/20/2006 6:41:00 AM

0


Hi Rebecca,

Select the target range and
Try this...

Sub test()
Dim cell As Object

For Each cell In Selection
If cell.Value <> "" Then
cell.Value = """" & cell.Value & """"
End If
Next cell
End Sub

Regards
Ankur Kanchan
www.xlmacros.com


On Dec 20, 11:13 am, Rebecca Plumridge <Rebecca
Plumri...@discussions.microsoft.com> wrote:
> I have an entire worksheet that I now need to add " (an apostrophe) to the
> start of each cell and " to the end of it to enclose the text within. Is it
> possible to create a macro for this?
>
> Any help would be greatly appreciated.
>
> Thanks