+ Reply to Thread
Results 1 to 4 of 4

adding a single quote and comma to every cell in Excel

  1. #1
    rodsheffield
    Guest

    adding a single quote and comma to every cell in Excel

    I need to make a script where I can add a single quote to the number in each
    cell in Excel and after the second quote a comma. Hence the cell would start
    like

    08558952

    and afterwards would look like,

    '08558952',

    I can't quite seem to get it done, any ideas?

    TIA,

    Rod

  2. #2
    Gary Keramidas
    Guest

    Re: adding a single quote and comma to every cell in Excel

    you don't mention whether you have the loop or not, but this formula will
    work, just loop through the cells

    ActiveCell.Value = "'" & ActiveCell.Value & "',"

    --


    Gary


    "rodsheffield" <rodsheffield@discussions.microsoft.com> wrote in message
    news:0C87E571-A1A1-4080-BB49-0DE6941977AE@microsoft.com...
    >I need to make a script where I can add a single quote to the number in
    >each
    > cell in Excel and after the second quote a comma. Hence the cell would
    > start
    > like
    >
    > 08558952
    >
    > and afterwards would look like,
    >
    > '08558952',
    >
    > I can't quite seem to get it done, any ideas?
    >
    > TIA,
    >
    > Rod




  3. #3
    rodsheffield
    Guest

    Re: adding a single quote and comma to every cell in Excel

    Gary,

    Actually no I don't have a loop in place. What are you suggesting code wise?

    Thanks again for your help.

    "Gary Keramidas" wrote:

    > you don't mention whether you have the loop or not, but this formula will
    > work, just loop through the cells
    >
    > ActiveCell.Value = "'" & ActiveCell.Value & "',"
    >
    > --
    >
    >
    > Gary
    >
    >
    > "rodsheffield" <rodsheffield@discussions.microsoft.com> wrote in message
    > news:0C87E571-A1A1-4080-BB49-0DE6941977AE@microsoft.com...
    > >I need to make a script where I can add a single quote to the number in
    > >each
    > > cell in Excel and after the second quote a comma. Hence the cell would
    > > start
    > > like
    > >
    > > 08558952
    > >
    > > and afterwards would look like,
    > >
    > > '08558952',
    > >
    > > I can't quite seem to get it done, any ideas?
    > >
    > > TIA,
    > >
    > > Rod

    >
    >
    >


  4. #4
    Gary Keramidas
    Guest

    Re: adding a single quote and comma to every cell in Excel

    why don't you email me what you have

    --


    Gary


    "rodsheffield" <rodsheffield@discussions.microsoft.com> wrote in message
    news:2E78E698-262D-4E3F-876A-6EA6AD11F65F@microsoft.com...
    > Gary,
    >
    > Actually no I don't have a loop in place. What are you suggesting code
    > wise?
    >
    > Thanks again for your help.
    >
    > "Gary Keramidas" wrote:
    >
    >> you don't mention whether you have the loop or not, but this formula will
    >> work, just loop through the cells
    >>
    >> ActiveCell.Value = "'" & ActiveCell.Value & "',"
    >>
    >> --
    >>
    >>
    >> Gary
    >>
    >>
    >> "rodsheffield" <rodsheffield@discussions.microsoft.com> wrote in message
    >> news:0C87E571-A1A1-4080-BB49-0DE6941977AE@microsoft.com...
    >> >I need to make a script where I can add a single quote to the number in
    >> >each
    >> > cell in Excel and after the second quote a comma. Hence the cell would
    >> > start
    >> > like
    >> >
    >> > 08558952
    >> >
    >> > and afterwards would look like,
    >> >
    >> > '08558952',
    >> >
    >> > I can't quite seem to get it done, any ideas?
    >> >
    >> > TIA,
    >> >
    >> > Rod

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1