Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default string concatenation

What's the difference between + and & for doing the job?

I thought from using an older version of excel, that + gave you a free
space, which was why I use &, but this no longer seems the case in
xl2000
--
Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default string concatenation

"Mike NG" wrote in message
...
What's the difference between + and & for doing the job?

I thought from using an older version of excel, that + gave you a free
space, which was why I use &, but this no longer seems the case in
xl2000


Hi Mike,

As far as I know, the ability to use + for string concatenation is
simply there for backward compatibility with early versions of BASIC.
There's no difference in their behavior that I'm aware of.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default string concatenation

I make enough mistakes. I don't think I want excel to guess what I really
wanted:

Option Explicit
Sub testme()

Dim myVal As Variant

myVal = 2 + 2: MsgBox myVal
myVal = 2 + "2": MsgBox myVal

myVal = 2 & 2: MsgBox myVal
myVal = 2 & "2": MsgBox myVal

End Sub




Mike NG wrote:

What's the difference between + and & for doing the job?

I thought from using an older version of excel, that + gave you a free
space, which was why I use &, but this no longer seems the case in
xl2000
--
Mike


--

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
Need Help With String Concatenation Rick Rothstein Excel Worksheet Functions 6 September 15th 11 10:42 PM
Need Help With String Concatenation Xt Excel Worksheet Functions 1 September 15th 11 09:47 PM
Bold in string concatenation Steen Excel Discussion (Misc queries) 12 November 7th 06 12:49 AM
concatenation mattguerilla Excel Discussion (Misc queries) 3 January 26th 06 11:47 PM
How do I put each member of string concatenation in its own line? DViolette Excel Worksheet Functions 3 July 8th 05 02:08 AM


All times are GMT +1. The time now is 12:20 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"