Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 = RndColD.Value Info1 = RndColD.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 = "" in [s = Info1(i)] is giving and error something about "Subscript out o range -- John2 ----------------------------------------------------------------------- John21's Profile: http://www.excelforum.com/member.php...fo&userid=3698 View this thread: http://www.excelforum.com/showthread.php?threadid=57047 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Based on the code you just posted you missed Tom's previous post about a typo
in his code... change RndColD to RngColD... 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 = "" -- HTH... Jim Thomlinson "John21" wrote: 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 = RndColD.Value Info1 = RndColD.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 = "" in [s = Info1(i)] is giving and error something about "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=570478 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
problems with? I don't know | Excel Discussion (Misc queries) | |||
SP3 problems | Excel Discussion (Misc queries) | |||
Problems merging an excel file due to code or file problems? | Excel Programming | |||
VBA Problems | Excel Programming |