Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8562659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:46:38+00:00 2026-06-11T16:46:38+00:00

I know excel has the data validation feature but is there a way to

  • 0

I know excel has the data validation feature but is there a way to automatically apply the changes for the user instead of prompting them that there is an issue?

For example, we have a general spreadsheet template for our internal system to add items. In the first column, for Item No, there can’t be any illegal characters. So if the user enters AN-XR10LP/1 in A1 and then clicks on the next cell, I would want the validation to correct the A1 value to be ANXR10LP1 without the user doing anything.

Any ideas on how I can start with this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:46:39+00:00Added an answer on June 11, 2026 at 4:46 pm

    I think you can only accomplish this with VBA. Try the code below. It may need to be tweaked if you have Data Validation on the cells.

    Place this module in the Worksheet Object where you want your data validated.

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Target.Column = 1 And Target.Rows.Count = 1 Then '-> make sure row count is 1 and target is in column A, can further refine if needed
    
        Dim strValue As String
    
        strValue = CleanString(Target.Value)
    
        Application.EnableEvents = False
        Target = strValue
        Application.EnableEvents = True
    
    End If
    
    End Sub
    
    Function CleanString(str As String) As String
    
    CleanString = Replace(str, "-", "")
    CleanString = Replace(CleanString, "/", "")
    '...
    'keep adding replacements as needed
    
    
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know if there is somewhere a excel template to download
I know that Phonegap has an event for back button, but it's only available
I don't know the best way to title this question but am trying to
I'm working on a keyword driven framework which has data written in excel sheet.
I have an excel sheet that has dde links to real time market data.
I have a Excel spreadsheet that has two tabs, I have data on the
I know this has been done before, but I am running into an issue
I want to know what the fastest way is of reading and writing data
I want to know if PHPExcel can: Create Excel spreadsheets with embeded image. The
I know I can use the RODBC library for accessing excel (.xls) docs from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.