Sub Quotize()

    Dim var As Variant
    Dim rng As Range
    Const lngColOffset As Long = 0 'Use 0 if you want to overwrite the cell
value

    Application.ScreenUpdating = 0
    Set rng = Range("B1:B10")
    var = Application.Transpose(rng.Value)

    For Each rng In rng
        With rng.Offset(, lngColOffset)
            .Formula = "=""'""&""" & rng.Value & """&""'"""
            .Copy
            .PasteSpecial -4163
        End With
    Next rng
    With Application
        .CutCopyMode = 0
        .ScreenUpdating = 1
    End With

End Sub

Sam Mathai Chacko

On Thu, Dec 8, 2011 at 6:34 PM, dguillett1 <dguille...@gmail.com> wrote:

>   reply to me with your file.
> dguillett1 @gmail.com
>
> Don Guillett
> SalesAid Software
> dguille...@gmail.com
>
>  *From:* ajinkya natu <natu.ajin...@gmail.com>
> *Sent:* Wednesday, December 07, 2011 8:38 PM
> *To:* excel-macros@googlegroups.com
> *Subject:* $$Excel-Macros$$ Single Quotes at the Start and End of the
> data in a cell
>
> Hello All,
>
> Firstly, Thanks for all the contribution to this wonderful community. Has
> been a lot of help always.
>
> Coming to my Query...I need to get the data in certain cells (text and
> numeric) to display single quotes at the start and the end.
>
> Have tried this saving the excel sheet in all formats. However, either the
> leading single quote doesn't show up in the cell itself  (though 1 can see
> it in the formula bar) or it just goes off once u save the file (in CSV).
>
> All in all i need is for the cells to display the value as 'Excel'  (text)
> and '256454' (Numeric). Also have tried using two single quotes. but wont
> suit my purpose ..just need 1 at the start and the end and the cell to
> display that.
>
> Would greatly appreciate the help. Thanks in advance.
>
> Regards,
> Ajinkya
>
>
>
>
>
> --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-macros@googlegroups.com
>
> --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-macros@googlegroups.com
>



-- 
Sam Mathai Chacko

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to