+ Reply to Thread
Results 1 to 8 of 8

Clear contents of wrong entry

  1. #1
    Forum Contributor
    Join Date
    03-14-2015
    Location
    Mexico
    MS-Off Ver
    365
    Posts
    279

    Clear contents of wrong entry

    I have this code to prevent wrong entry however I have not been able to delete the wrong data. Example if the user types 1234, these numbers stay in the cell and I want to delete them until they enter a number of 18 digits.

    Can someone give me a hand?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Clear contents of wrong entry

    Hi fabian_76

    Try this Code...you may have to play with the formatting of the Cells in the Range...
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Contributor
    Join Date
    03-14-2015
    Location
    Mexico
    MS-Off Ver
    365
    Posts
    279

    Re: Clear contents of wrong entry

    Thank you so much John, it worked. Additional question / favor that just came to my mind. If user types "check", I would like to either copy and past "check" to adjacent cell which would be in same row but Column J.

    Thanks in advance

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Clear contents of wrong entry

    Hi fabian
    It'll be much easier and more productive if you would attach a Sample File...

    Please attach a sample workbook the Structure of which is the same as your actual workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    INCLUDE ANY CODE YOU'RE USING OR HAVE TRIED.

    Remember to desensitize the data.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

  5. #5
    Forum Contributor
    Join Date
    03-14-2015
    Location
    Mexico
    MS-Off Ver
    365
    Posts
    279

    Re: Clear contents of wrong entry

    Thank you! Here it is. In yellow is my goal in tab Target. Simply copy and past from one column to the other column
    Attached Files Attached Files

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Clear contents of wrong entry

    Hi fabian

    Not thoroughly tested...
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    03-14-2015
    Location
    Mexico
    MS-Off Ver
    365
    Posts
    279

    Re: Clear contents of wrong entry

    Thank you so much, I was able to get it work

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Clear contents of wrong entry

    You're welcome...glad I could help.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    Thanks for the Rep...

+ 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. Clear cell contents based on adjacent cell entry
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2018, 05:37 AM
  2. [SOLVED] Clear Contents depending on cell contents
    By terratushi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-15-2017, 08:02 PM
  3. Clear merged cell contents in comand button(clear all)
    By mohan_984 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-25-2015, 10:39 AM
  4. clear contents of entire sheet except the contents of the table
    By wayneg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-06-2015, 08:41 AM
  5. [SOLVED] Clear contents based on contents of another cell
    By Katrina DTE in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-13-2013, 02:44 PM
  6. Copy list contents down, then clear contents
    By hektisk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2011, 04:34 PM
  7. Clear sheet contents but retain Clipboard contents
    By nebb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2007, 01:42 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