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

Hi,

I was just wondering if the following is possible in VBA:

suppose I have a collection of integer varaibles; called Integer1, Integer2.

Lets say these variables are used to count the occurance of particlaur
events which are also coded as integers from 1 to 5.

So the variable Code is set to evalue each one of these in turn.

Instead of saying if code=1 then integer1=integer1+1 etc.,
is it possible to use something in the form of Integer & Code=Integer & Code
+1.

I hope you see the point I am making and thus be able to tell me if it is
possible.

Many thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Concatenate variables

Graham

Yes, the following returns 12345, prersumably as a string

Dim i As Long, s
For i = 1 To 5
s = s & i
Next
Debug.Print s

you would return it to a number with s = s * 1

Regards
Peter

"Graham Whitehead" wrote:

Hi,

I was just wondering if the following is possible in VBA:

suppose I have a collection of integer varaibles; called Integer1, Integer2.

Lets say these variables are used to count the occurance of particlaur
events which are also coded as integers from 1 to 5.

So the variable Code is set to evalue each one of these in turn.

Instead of saying if code=1 then integer1=integer1+1 etc.,
is it possible to use something in the form of Integer & Code=Integer & Code
+1.

I hope you see the point I am making and thus be able to tell me if it is
possible.

Many thanks.



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
Not at all clear on use of variables and/or object variables JMay-Rke Excel Discussion (Misc queries) 11 July 4th 08 06:36 PM
Concatenate Sena Excel Discussion (Misc queries) 1 September 9th 07 02:44 PM
Concatenate two variables (String & Integer) Sreenivas Varadhan Excel Programming 3 December 12th 05 01:28 PM
I know how to concatenate ,can one de-concatenate to split date? QUICK BOOKS PROBLEM- New Users to Excel 1 July 26th 05 05:07 PM
how do you concatenate two variables in VBA billabong Excel Programming 1 September 26th 03 12:30 AM


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