![]() |
Setting an array range of cells???
Hi all, how do i write this as a range that wont cause an error in my code? Set rng = Range("C4:C48,E4:E48,G4:G48,I4:I48,K4:K48,M4:M48,C 52:C94,E52:E94,G52:G94,I52:I94,K52:K94,M52:M94,C10 0:C142,E100:E142,G100:G142,I100:I142,K100:K142,M10 0:M142,C148:C190,E148:E190,G148:G190,I148:I190,K14 8:K190,M148:M190,C196:C238,E196:E238,G196:G238,I19 6:I238,K196:K238,M196:M238") Hope you can help! Regards, Simon -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=552445 |
Setting an array range of cells???
Give this a try...
Set rng = Intersect(Range("C:C,E:E,G:G,I:I,K:K,M:M"), _ Range("4:48,52:94,100:142,148:190,196:238")) -- HTH... Jim Thomlinson "Simon Lloyd" wrote: Hi all, how do i write this as a range that wont cause an error in my code? Set rng = Range("C4:C48,E4:E48,G4:G48,I4:I48,K4:K48,M4:M48,C 52:C94,E52:E94,G52:G94,I52:I94,K52:K94,M52:M94,C10 0:C142,E100:E142,G100:G142,I100:I142,K100:K142,M10 0:M142,C148:C190,E148:E190,G148:G190,I148:I190,K14 8:K190,M148:M190,C196:C238,E196:E238,G196:G238,I19 6:I238,K196:K238,M196:M238") Hope you can help! Regards, Simon -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=552445 |
Setting an array range of cells???
Hi Jim worked a treat thanks! Regards, Simon -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=552445 |
All times are GMT +1. The time now is 04:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com