or by area:
uni_tar.Areas(1).Value = uni.Areas(1).Value
uni_tar.Areas(2).Value = uni.Areas(2).Value
copy paste skipping blanks might be an option
cheers
Simon
"Bob Phillips" wrote:
Can you do it one at a time?
sht.[a15:b15].Value = sht.[a7:b7].Value
sht.[a19:b19].Value = sht.[a9:b9].Value
--
HTH
RP
(remove nothere from the email address if mailing direct)
"tom taol" wrote in message
...
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!