Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yep, here is the correction
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,1) Else s = s & "," & Info1(i,1) End If End If Next i Range("I493").Value = s s = "" -- Regards, Tom Ogilvy "John21" wrote: 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=570427 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IME MODE FOR EXCEL 2007 (URGENT URGENT) | Excel Discussion (Misc queries) | |||
last modification | Excel Discussion (Misc queries) | |||
Need exit Sub modification | Excel Programming | |||
Modification | Excel Programming | |||
Is Solver Modification Possible? PLEASE HELP! | Excel Programming |