Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You used two dimensions when you referred to info.
If info(i,1) = Range("A493").Value Then How about trying two dimensions when you refer to info1? John21 wrote: This code: dim RngColD as Range, Info as Variant, Info1 as Variant Dim s as String s = "" Set RngColD = Range("D2", Range("D" & Rows.Count).End(xlUp)) Info = RngColD.Value Info1 = RngColD.Offset(0,10).Value For i = 1 to Ubound(info,1) If info(i,1) = Range("A493").Value Then If s = "" Then s = Info1(i) Else s = s & "," & Info1(i) End If End If Next i Range("I493").Value = s s = "" .............is giving the same error as before in the declaration of "s" [s = Info1(i)] "Subscript out of range" -- John21 ------------------------------------------------------------------------ John21's Profile: http://www.excelforum.com/member.php...o&userid=36983 View this thread: http://www.excelforum.com/showthread...hreadid=571331 -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with a program code | Excel Programming | |||
Having a problem getting Excel to work from my .Net VB Program | Excel Programming | |||
vba program problem | Excel Programming | |||
How to program to resolve the following problem. ..thx | Excel Programming | |||
program speed problem | Excel Programming |