Add single code using macro in excel

  • .

  • manavairajan (4/7/2011)


    Sub addsinglequte()

    For a = 1 To 60

    Range("d" & a).Select

    If Len(ActiveCell.Value) > 0 Then ActiveCell.Value = "''" & ActiveCell.Value & "',"

    Next

    End Sub

    Is there a question in here somewhere? are you trying to do the same in TSQL? this looks like it is concatenating 60 cells into a comma delimited striung.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Lowell (4/7/2011)


    Is there a question in here somewhere? are you trying to do the same in TSQL? this looks like it is concatenating 60 cells into a comma delimited striung.

    How do I put single quotes plus a comma around data in 60 cells in column D of a spreadsheet using VBA? 😉 😀

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply