Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to add "
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to add "
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 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to add "
Thanks so much!! Worked first time and saved me hours of grief!!
"ankur" wrote: 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 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Need macro to auto set option buttons all to "Yes" or "No" | Excel Worksheet Functions | |||
Change default in input box from "20" to "000000"? Have macro continue on to name sheet tab? | Excel Programming | |||
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" | Excel Discussion (Misc queries) | |||
"Clean Me" Macro is giving "#VALUE!" error in the Notes field. | Excel Programming | |||
Sending macro based e-mail with built-in "Heading" and "Text" | Excel Programming |