LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Concat Variant Values


I have a For Each....Next loop running along with a counter. Within this
I have two variants that refer to different cells which vary depending
on the value of the counter (+1 everytime a loop is made) and wanting
to concatenate the values in the two. As in:

counter = 0

For Each c In Worksheets("Sheet1").Range("A1:A700")

Dim var1 As Variant
Dim var2 As Variant

var 1 = "A" & counter
var 2 = "B" & counter

'Need to concat values in var1 and var 2 here

counter = counter +1

Next

So if var1 = A1, and var2 = B1, i would then want to concatenate the
values in those cells. But how can i concat using variants? (i.e.
var1.value & " " & var2.value). Is it possible to convert the variants
into strings/numerics to solve the problem?


--
br_turnbull
------------------------------------------------------------------------
br_turnbull's Profile: http://www.excelforum.com/member.php...o&userid=27479
View this thread: http://www.excelforum.com/showthread...hreadid=469910

 
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
To get a sum for variant currency values [email protected] Excel Discussion (Misc queries) 3 November 24th 07 01:07 PM
howto: concat (x1:x3) Marc Hebert New Users to Excel 3 December 15th 06 07:52 PM
Concat Macro help... [email protected] Excel Discussion (Misc queries) 4 August 8th 06 05:09 PM
Convert values in a variant array to integer values Graham McNeill Excel Programming 1 November 13th 04 12:47 AM
Variant Array with String Values - Type Mismatch jamiee Excel Programming 2 March 7th 04 03:39 AM


All times are GMT +1. The time now is 03:35 PM.

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"