+ Reply to Thread
Results 1 to 8 of 8

Code to erase formula but keep text for specific cells in range

  1. #1
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Code to erase formula but keep text for specific cells in range

    Im looking for code to perform the following:
    If text in F6 down to last cell equals 'Barcode Only Mode', then erase the formula for that cell but keep the text (or just erase it and then enter 'Barcode Only Mode' if thats easier, same thing).

  2. #2
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: Code to erase formula but keep text for specific cells in range

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: Code to erase formula but keep text for specific cells in range

    ikboy that just removes the formula for all cells in the range.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Code to erase formula but keep text for specific cells in range

    How about this.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: Code to erase formula but keep text for specific cells in range

    That code doesn't seem to do anything I can see. No errors.

  6. #6
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Code to erase formula but keep text for specific cells in range

    Hello Nitefox,

    Try this version:-

    Please Login or Register  to view this content.
    I hope that this helps.

    Cheerio,
    vcoolio.
    Last edited by vcoolio; 07-15-2018 at 10:59 PM. Reason: Typos

  7. #7
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: Code to erase formula but keep text for specific cells in range

    Thanks vcoolio that worked great.

  8. #8
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Code to erase formula but keep text for specific cells in range

    You're welcome Nitefox.

    I'm glad that I was able to help.

    Cheerio,
    vcoolio.

+ 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. [SOLVED] VBA to replace cells containing specific text in a large range with an array formula
    By DaveBre in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-22-2016, 01:21 AM
  2. VBA code that will re-apply my formula to the specific range of cells
    By glenn0004 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-29-2015, 08:49 AM
  3. VBA code to delete columns that contain a specific text in a range
    By rshnkmr39 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2014, 01:48 PM
  4. [SOLVED] Erase the content of cells with a particular formula
    By Saturn in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-06-2014, 04:03 PM
  5. VB Code to erase two cells as data changes in another
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 09-30-2013, 12:28 AM
  6. [SOLVED] Return specific text if a different text is contained anywhere in a range of cells
    By ciayers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-06-2013, 05:54 PM
  7. Replies: 7
    Last Post: 09-18-2012, 04:17 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