#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default The @ symbol

I am importing text into a range of cells then processing it using a VBA
macro to replace particular characters.

However if the imported text starts with the @ character the replacement
routine does not process that cell or subsequent cells.

In this instance, because I control the exported data, I have simply added a
"Space" character before the @ symbol prior to exporting.

However this may not always be an option.

Does anyone have any suggestions on how to force the replace function to
treat the @ symbol as a normal character?

Regards GeraldM
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default The @ symbol

If you first format a cell as Text you can enter a string with @ as the first
character.

If you start your string with a single quote (apostrophe) the first "real"
character can be @
--
Gary''s Student - gsnu200817


"GeraldM" wrote:

I am importing text into a range of cells then processing it using a VBA
macro to replace particular characters.

However if the imported text starts with the @ character the replacement
routine does not process that cell or subsequent cells.

In this instance, because I control the exported data, I have simply added a
"Space" character before the @ symbol prior to exporting.

However this may not always be an option.

Does anyone have any suggestions on how to force the replace function to
treat the @ symbol as a normal character?

Regards GeraldM

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default The @ symbol

when I formatted the cells receiving text that started with the @ symbol as
Text, I had no problems. Perhaps you can have your workbook set up with the
column receiving the input as Text before distributing it?

I've got to really dig around some, perhaps this will jog someone else's
memory better than mine. If I remember correctly, the @ symbol has something
to do with compatibility with LOTUS 1-2-3 files, and perhaps that's a clue to
a better solution. maybe. somehow.

"GeraldM" wrote:

I am importing text into a range of cells then processing it using a VBA
macro to replace particular characters.

However if the imported text starts with the @ character the replacement
routine does not process that cell or subsequent cells.

In this instance, because I control the exported data, I have simply added a
"Space" character before the @ symbol prior to exporting.

However this may not always be an option.

Does anyone have any suggestions on how to force the replace function to
treat the @ symbol as a normal character?

Regards GeraldM

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default The @ symbol

Enter:
@SUM(1,2)
and Excel translates it into:
=SUM(1,2)

Could this be a spelling correction??
--
Gary''s Student - gsnu200817


"JLatham" wrote:

when I formatted the cells receiving text that started with the @ symbol as
Text, I had no problems. Perhaps you can have your workbook set up with the
column receiving the input as Text before distributing it?

I've got to really dig around some, perhaps this will jog someone else's
memory better than mine. If I remember correctly, the @ symbol has something
to do with compatibility with LOTUS 1-2-3 files, and perhaps that's a clue to
a better solution. maybe. somehow.

"GeraldM" wrote:

I am importing text into a range of cells then processing it using a VBA
macro to replace particular characters.

However if the imported text starts with the @ character the replacement
routine does not process that cell or subsequent cells.

In this instance, because I control the exported data, I have simply added a
"Space" character before the @ symbol prior to exporting.

However this may not always be an option.

Does anyone have any suggestions on how to force the replace function to
treat the @ symbol as a normal character?

Regards GeraldM

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default The @ symbol

I'm reading this as the import of the data works fine--but subsequently, you
make a change to cells that start with that @ symbol.

And then all heck breaks lose.

Excel does change that leading @ to an equal sign -- even if the cell was
formatted to text before the change. Then it burps if the resulting change
would not have been a valid function.

This seemed to work ok for me:
Select the range to change
edit|replace
what: @
with: '@ (apostrophe @)
replace all

The cells that begin with @ will still look nice in the cell -- but you'll see
the leading apostrophe in the formula bar. The cells that have @ somewhere in
the middle will now look like asdf'@qwer (with that newly embedded apostrophe).

Then do your real edit|replaces. That leading apostrophe will keep the cell
text even after the change.

Then clean up your mess.

Selec the range again (if you have to)
edit|replace
what: '@
with: @
replace all

Excel won't touch that prefixcharacter, but will remove the embedded
apostrophe's. (This can often be a curse. But for you it's a nice feature.)

If you're using a macro, you could include the two extra edit|replaces in your
code, too.

GeraldM wrote:

I am importing text into a range of cells then processing it using a VBA
macro to replace particular characters.

However if the imported text starts with the @ character the replacement
routine does not process that cell or subsequent cells.

In this instance, because I control the exported data, I have simply added a
"Space" character before the @ symbol prior to exporting.

However this may not always be an option.

Does anyone have any suggestions on how to force the replace function to
treat the @ symbol as a normal character?

Regards GeraldM


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default The @ symbol

ps. You may find that just changing that @ symbol to something else makes life
a lot easier. (Don't use ', ", or ^ (apostrophe, doublequote, or caret). They
all mean something special to excel.)

Dave Peterson wrote:

I'm reading this as the import of the data works fine--but subsequently, you
make a change to cells that start with that @ symbol.

And then all heck breaks lose.

Excel does change that leading @ to an equal sign -- even if the cell was
formatted to text before the change. Then it burps if the resulting change
would not have been a valid function.

This seemed to work ok for me:
Select the range to change
edit|replace
what: @
with: '@ (apostrophe @)
replace all

The cells that begin with @ will still look nice in the cell -- but you'll see
the leading apostrophe in the formula bar. The cells that have @ somewhere in
the middle will now look like asdf'@qwer (with that newly embedded apostrophe).

Then do your real edit|replaces. That leading apostrophe will keep the cell
text even after the change.

Then clean up your mess.

Selec the range again (if you have to)
edit|replace
what: '@
with: @
replace all

Excel won't touch that prefixcharacter, but will remove the embedded
apostrophe's. (This can often be a curse. But for you it's a nice feature.)

If you're using a macro, you could include the two extra edit|replaces in your
code, too.

GeraldM wrote:

I am importing text into a range of cells then processing it using a VBA
macro to replace particular characters.

However if the imported text starts with the @ character the replacement
routine does not process that cell or subsequent cells.

In this instance, because I control the exported data, I have simply added a
"Space" character before the @ symbol prior to exporting.

However this may not always be an option.

Does anyone have any suggestions on how to force the replace function to
treat the @ symbol as a normal character?

Regards GeraldM


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default The @ symbol

Good advice, all. And thanks for reminding me of how @ gets translated in
the 'carry over' from Lotus cell formula protocol.

"Dave Peterson" wrote:

ps. You may find that just changing that @ symbol to something else makes life
a lot easier. (Don't use ', ", or ^ (apostrophe, doublequote, or caret). They
all mean something special to excel.)

Dave Peterson wrote:

I'm reading this as the import of the data works fine--but subsequently, you
make a change to cells that start with that @ symbol.

And then all heck breaks lose.

Excel does change that leading @ to an equal sign -- even if the cell was
formatted to text before the change. Then it burps if the resulting change
would not have been a valid function.

This seemed to work ok for me:
Select the range to change
edit|replace
what: @
with: '@ (apostrophe @)
replace all

The cells that begin with @ will still look nice in the cell -- but you'll see
the leading apostrophe in the formula bar. The cells that have @ somewhere in
the middle will now look like asdf'@qwer (with that newly embedded apostrophe).

Then do your real edit|replaces. That leading apostrophe will keep the cell
text even after the change.

Then clean up your mess.

Selec the range again (if you have to)
edit|replace
what: '@
with: @
replace all

Excel won't touch that prefixcharacter, but will remove the embedded
apostrophe's. (This can often be a curse. But for you it's a nice feature.)

If you're using a macro, you could include the two extra edit|replaces in your
code, too.

GeraldM wrote:

I am importing text into a range of cells then processing it using a VBA
macro to replace particular characters.

However if the imported text starts with the @ character the replacement
routine does not process that cell or subsequent cells.

In this instance, because I control the exported data, I have simply added a
"Space" character before the @ symbol prior to exporting.

However this may not always be an option.

Does anyone have any suggestions on how to force the replace function to
treat the @ symbol as a normal character?

Regards GeraldM


--

Dave Peterson


--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default The @ symbol

Thanks Dave, and everyone else who answered.

The offending symbol is entered into a text field of an SQL database.
Unfortunately I am not the originator of the data and have no control of what
is entered. I do however have control of the export (an SQL query). So I am
now testing the first character of the exported field and if it contains a
problematic character (like the @ symbol) I am pre-fixing the data with a
space.

I don't want to change the @ symbol in caseit spoils the meaning of the
original text.

All appears to be working OK now but it did take quite a lot of effort to
discover what the problem was.

Regards GeraldM

"Dave Peterson" wrote:

ps. You may find that just changing that @ symbol to something else makes life
a lot easier. (Don't use ', ", or ^ (apostrophe, doublequote, or caret). They
all mean something special to excel.)

Dave Peterson wrote:

I'm reading this as the import of the data works fine--but subsequently, you
make a change to cells that start with that @ symbol.

And then all heck breaks lose.

Excel does change that leading @ to an equal sign -- even if the cell was
formatted to text before the change. Then it burps if the resulting change
would not have been a valid function.

This seemed to work ok for me:
Select the range to change
edit|replace
what: @
with: '@ (apostrophe @)
replace all

The cells that begin with @ will still look nice in the cell -- but you'll see
the leading apostrophe in the formula bar. The cells that have @ somewhere in
the middle will now look like asdf'@qwer (with that newly embedded apostrophe).

Then do your real edit|replaces. That leading apostrophe will keep the cell
text even after the change.

Then clean up your mess.

Selec the range again (if you have to)
edit|replace
what: '@
with: @
replace all

Excel won't touch that prefixcharacter, but will remove the embedded
apostrophe's. (This can often be a curse. But for you it's a nice feature.)

If you're using a macro, you could include the two extra edit|replaces in your
code, too.

GeraldM wrote:

I am importing text into a range of cells then processing it using a VBA
macro to replace particular characters.

However if the imported text starts with the @ character the replacement
routine does not process that cell or subsequent cells.

In this instance, because I control the exported data, I have simply added a
"Space" character before the @ symbol prior to exporting.

However this may not always be an option.

Does anyone have any suggestions on how to force the replace function to
treat the @ symbol as a normal character?

Regards GeraldM


--

Dave Peterson


--

Dave Peterson

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
SYMBOL ¦please help how do i do this symbol without copy/pasting i babybloo Excel Worksheet Functions 1 June 26th 08 09:29 AM
Align dollar symbol, align currency symbol... Mark Excel Discussion (Misc queries) 1 April 9th 08 04:39 AM
What is this symbol and how do I get rid of it. HoganD87 Excel Discussion (Misc queries) 3 August 20th 07 06:26 PM
what shortcut key do I use for the + symbol over the - symbol cherokee Excel Discussion (Misc queries) 5 July 14th 06 01:43 AM
I need a symbol but "symbol" in the Insert menu is grayed-out. Nothappy Excel Discussion (Misc queries) 2 May 3rd 05 01:16 AM


All times are GMT +1. The time now is 04:39 AM.

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

About Us

"It's about Microsoft Excel"