PC Review


Reply
Thread Tools Rate Thread

How to delete a question mark throughout database

 
 
TJ
Guest
Posts: n/a
 
      20th Dec 2006
The last answer for my 18,000 record database worked wonders. Now the
problem is that throughout the database, the dataentry person /
transcriber inserted the character '?' most anywhere in the cell where
they were unsure of what they were transcribing. The format should have
been 'lastname, firstname.' Instead throughout I have found 'lastname?,
firstname?' What I would like is for a macro to locate those random ?s
and ask me if I want it deleted and hit enter to make it go away. Any
thoughts? Also, doing a search for the ?s doesn't work since this works
as a wildcard. Any help would be greatly appreciated. TJ

 
Reply With Quote
 
 
 
 
Nick Hodge
Guest
Posts: n/a
 
      20th Dec 2006
TJ

Why do you need code if you are asking each time to delete? Why not just
use find and replace.

To search for a wildcard * or %, prefix with a tilde ~* or ~?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(E-Mail Removed)DTHIS
www.nickhodge.co.uk


"TJ" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The last answer for my 18,000 record database worked wonders. Now the
> problem is that throughout the database, the dataentry person /
> transcriber inserted the character '?' most anywhere in the cell where
> they were unsure of what they were transcribing. The format should have
> been 'lastname, firstname.' Instead throughout I have found 'lastname?,
> firstname?' What I would like is for a macro to locate those random ?s
> and ask me if I want it deleted and hit enter to make it go away. Any
> thoughts? Also, doing a search for the ?s doesn't work since this works
> as a wildcard. Any help would be greatly appreciated. TJ
>


 
Reply With Quote
 
Jason Lepack
Guest
Posts: n/a
 
      20th Dec 2006
Make a backup of your 18000 record database and then make another copy
and test this out on it. Select the cells that you want to search for
the ? in and then run this macro.

Sub Macro2()
Dim r As Range, x As Integer
For Each r In Selection
x = InStr(1, r, "?")
If x > 0 Then
If MsgBox(r & vbCrLf & vbCrLf & "Delete This?", vbYesNo) =
vbYes Then
r = ""
End If
End If
Next r
End Sub

It shows a message box that asks if you want to delete the value. If
you click "Yes" then it empties that cell.

Cheers,
Jason Lepack
TJ wrote:
> The last answer for my 18,000 record database worked wonders. Now the
> problem is that throughout the database, the dataentry person /
> transcriber inserted the character '?' most anywhere in the cell where
> they were unsure of what they were transcribing. The format should have
> been 'lastname, firstname.' Instead throughout I have found 'lastname?,
> firstname?' What I would like is for a macro to locate those random ?s
> and ask me if I want it deleted and hit enter to make it go away. Any
> thoughts? Also, doing a search for the ?s doesn't work since this works
> as a wildcard. Any help would be greatly appreciated. TJ


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete asterik mark da Microsoft Excel Misc 4 6th Oct 2009 08:28 PM
delete and mark as read =?Utf-8?B?QWxiZXJ0bw==?= Microsoft Outlook Discussion 4 9th Nov 2007 05:34 PM
Footnote Custom Mark will not delete =?Utf-8?B?UGFuY2FrZUJhdHRlcg==?= Microsoft Word Document Management 2 22nd Nov 2006 09:01 PM
Can I delete a paragraph mark in a header? =?Utf-8?B?S3Jpc3R5c2tp?= Microsoft Word Document Management 5 16th Feb 2005 05:08 PM
Delete and Mark Duplicate? sbcglobal Microsoft Access 0 14th Dec 2004 08:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:15 AM.