View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tom taol tom taol is offline
external usenet poster
 
Posts: 52
Default without for loop



the below source code work, but is not true. why?
i want to be a15=2,b15=5,a19=7,b19=8
i want to be worked using array or union method without for loop.

Sub unii()
Dim sht As Worksheet
Set sht = ThisWorkbook.Sheets(1)

Set uni = Union(sht.[a7:b7], sht.[a9:b9])
Set uni_tar = Union(sht.[a15:b15], sht.[a19:b19])
uni_tar.Value = uni.Value
End Sub


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!