Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to delete a question mark throughout database

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default How to delete a question mark throughout database

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
DTHIS
www.nickhodge.co.uk


"TJ" wrote in message
ups.com...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default How to delete a question mark throughout database

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the Question Mark With COUNTIF Thomas M. Excel Worksheet Functions 8 January 22nd 10 04:13 AM
Delete asterik mark da Excel Discussion (Misc queries) 4 October 6th 09 08:28 PM
Question Mark in a box shamrock1269 Excel Discussion (Misc queries) 7 May 14th 09 08:53 PM
Mark active row in column A (VB question) Ben Excel Discussion (Misc queries) 4 May 29th 08 06:55 PM
How can I find and mark double entries in a customer database? Madeleine Excel Worksheet Functions 1 November 30th 05 02:59 PM


All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"