Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default the ' symbol ends the SQL string, how do you replace it Excel

I am creating a VBA button to pass info to an Access database. However the
original data contains the single quote in front of each entry. (To ensure a
text entry I'm assuming since this is another databases dump.)
But when I try to do a search and replace on this character from within
Excel, I'm told it isn't found. Even when I cut and paste it into the search
tool! The sheet is not protected.
I need a scriptable solution as this will how all the worksheets will be
provided to me and I do not want to have to translate each to with copy and
paste and new formulas etc.
Any help out there????
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default the ' symbol ends the SQL string, how do you replace it Excel

Hi Valori,

I am creating a VBA button to pass info to an Access database. However the
original data contains the single quote in front of each entry. (To ensure a
text entry I'm assuming since this is another databases dump.)
But when I try to do a search and replace on this character from within
Excel, I'm told it isn't found. Even when I cut and paste it into the search
tool! The sheet is not protected.
I need a scriptable solution as this will how all the worksheets will be
provided to me and I do not want to have to translate each to with copy and
paste and new formulas etc.
Any help out there????


Are you sure the apostrophe (single quote) character ' prefixes your values?

Excel treats any value prefixed with a single quote as a text entry.

The character will be shown in the Formula Bar, or in-cell, when
editing, but upon confirming the entry, the character is not shown;
hence you cannot search for it.

FYI: If you had an asterisk in a value, for example, as this is used to
signify a "wildcard" character in the search (and replace) dialog, you
would search for it by prefixing with a tilde ~ character.

That is, ~*


To overcome your issue, try exporting the Excel data to a text file &
see if the single quote character is actually part of the cell value(s)
or not.

BFN,

fp.
[ http://www.experts-exchange.com/M_258171.html ]
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default the ' symbol ends the SQL string, how do you replace it Excel

Ignore the single quote unless you find it is affecting your results. More
than likely it will have no affect.

--
Regards,
Tom Ogilvy


"Valori" wrote in message
...
I am creating a VBA button to pass info to an Access database. However

the
original data contains the single quote in front of each entry. (To ensure

a
text entry I'm assuming since this is another databases dump.)
But when I try to do a search and replace on this character from within
Excel, I'm told it isn't found. Even when I cut and paste it into the

search
tool! The sheet is not protected.
I need a scriptable solution as this will how all the worksheets will be
provided to me and I do not want to have to translate each to with copy

and
paste and new formulas etc.
Any help out there????



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
How do I find and replace a symbol in an excel spreadsheet John C Excel Discussion (Misc queries) 1 June 23rd 05 12:58 AM
Excel - Find & Replace text in a string bklim Excel Programming 5 June 14th 05 07:37 AM
How do I replace * as a character in a string in Excel? nicolegt Excel Programming 1 January 21st 05 10:42 AM
Adding quotes to the ends of a string variable Torben Laursen Excel Programming 2 November 13th 04 11:37 AM
Data string ends up in first cell instead of Comma sepaerated CSV format Katherine[_3_] Excel Programming 2 September 27th 03 06:24 PM


All times are GMT +1. The time now is 09:14 PM.

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"