+ Reply to Thread
Results 1 to 6 of 6

MACRO - Create worksheet adding an apostrophe

  1. #1
    Registered User
    Join Date
    02-01-2017
    Location
    Lisboa
    MS-Off Ver
    2010
    Posts
    81

    MACRO - Create worksheet adding an apostrophe

    Hi, I need some help with a problem that I am trying to solve. I hope someone can help me!

    I found two macros that I need to use one after another : one that creates a new Worksheet only with values (without formulas), and another macro that adds an apostrophe (') at the beginning of each cell, (so I can convert several columns to text).

    Is there any way to create a single macro that creates a new worksheet, without the formulas but with an apostrophe (') at the beginning of each cell?

    MACRO 1 (create new worksheet)
    Please Login or Register  to view this content.
    MACRO 2 (add an apostrophe)
    Please Login or Register  to view this content.
    Any suggestions would be greatly appreciated!!!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: MACRO - Create worksheet adding an apostrophe

    ActiveSheet.copy, creates a workbook with 1 sheet only(with the copied sheet) you do not need to loop through the sheets as there is only one sheet.

    You can change the cell formatting to text
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-01-2017
    Location
    Lisboa
    MS-Off Ver
    2010
    Posts
    81

    Re: MACRO - Create worksheet adding an apostrophe

    Hi,

    But I really need that all the values have an apostrophe at the begginning (') is necesary to import this excel file to an aplication i have....

    I tried to create a macro that call the two macros but also does not work...I think the problem is the first macro creates a new worksheet only with values and the second macro do not work in this new worksheet..

    Is posible to make a macro that creates a new worksheet only with values but with an apostrophe at the beginning?

    Thanks in advanced!

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: MACRO - Create worksheet adding an apostrophe

    Is your code not working?

  5. #5
    Registered User
    Join Date
    02-01-2017
    Location
    Lisboa
    MS-Off Ver
    2010
    Posts
    81

    Re: MACRO - Create worksheet adding an apostrophe

    Hi,

    No, is not working ...when I call the two macros, appears an error and it doesn´t work....Creates the new worksheet but it doesn´t put the apostrophe at the beginning...

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: MACRO - Create worksheet adding an apostrophe

    Can you try this:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Create a macro to create a pivot table in a worksheet
    By Triscia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-15-2015, 10:53 AM
  2. Excel adding an apostrophe!
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-22-2014, 06:36 AM
  3. Adding apostrophe to cells
    By scottdog129 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2011, 02:48 PM
  4. Function for making a string possesive by adding an apostrophe?
    By beauzeau in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-15-2008, 02:14 PM
  5. How do I create a macro for adding spreadsheets?
    By Kristin from NYS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2006, 12:45 PM
  6. [SOLVED] adding apostrophe macro?
    By GolfGal in forum Excel General
    Replies: 2
    Last Post: 04-24-2005, 12:06 PM
  7. Adding an apostrophe
    By Jeff in forum Excel General
    Replies: 2
    Last Post: 03-09-2005, 01:06 PM

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