Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem using the "&"

Status
Not open for further replies.

MuskyMan

Technical User
Jul 31, 2002
36
US
I'm sure there is a simple reason, but...

Using Excel 2002 and need to use the MID function.

Need to perform the following in a cell:

=MID(B1,2,3) &"-" & MID(B1,5,7)

What happens is that as soon as I type & Excel changes it to an "and" and I get an error message.

Thanks for your help!
 
use + instead & Sometimes... the BASIC things in life are the best...
cheers.gif

or at least the most fun ;-)
-Josh Stribling
 
I think the problem is that you have the autocorrect "Replace text as you type" option on and there is an entry in the autocorrect for &/and so that as soon as you type & it replaces it with and. Go to Tools/AutoCorrect Options and either uncheck the "Replace Text As You type" or delete the &/and entry from the dictionary.

Scott
 
you can use:
+ trim(str(x))
in place of:
& x

if all else fails Sometimes... the BASIC things in life are the best...
cheers.gif

or at least the most fun ;-)
-Josh Stribling
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top