Your code is OK except for "Set". The line should be:
x = Cells(i, 6).value
"Set" assigns an object reference to a variable or property. In other
words it is used to give a name to an object.
--
raypayette
------------------------------------------------------------------------
raypayette's Profile:
http://www.excelforum.com/member.php...o&userid=29569
View this thread:
http://www.excelforum.com/showthread...hreadid=566349