#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default union range

have not used union before trying following not good HELP
Thanks

Union(Range(Target.Offset(0,-11,8,7,5))),target.offset(0,0).Copy _
Destination:=rngPaste
What I want to do is to copy cells -11,8,7,5 and the target cell. The target
cell is text all others are numeric. Target cell is the trigger for this.

Thanks Again
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default union range

Maybe

Union(Range(Target.Offset(0,-11,8,7,5)),Target).Copy _
Destination:=rngPaste


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Curt" wrote in message
...
have not used union before trying following not good HELP
Thanks

Union(Range(Target.Offset(0,-11,8,7,5))),target.offset(0,0).Copy _
Destination:=rngPaste
What I want to do is to copy cells -11,8,7,5 and the target cell. The
target
cell is text all others are numeric. Target cell is the trigger for this.

Thanks Again



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default union range

wrong nbr arguments compile lites up .Offset have tried this where next?

"Bob Phillips" wrote:

Maybe

Union(Range(Target.Offset(0,-11,8,7,5)),Target).Copy _
Destination:=rngPaste


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Curt" wrote in message
...
have not used union before trying following not good HELP
Thanks

Union(Range(Target.Offset(0,-11,8,7,5))),target.offset(0,0).Copy _
Destination:=rngPaste
What I want to do is to copy cells -11,8,7,5 and the target cell. The
target
cell is text all others are numeric. Target cell is the trigger for this.

Thanks Again




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default union range

The VBA Offset method only takes 2 arguments (see VBA Help), so it's
hard to see what you're trying to do here, or even how many cells you're
trying to copy...

Perhaps:

With Target
Union(.Offset(0, -11), .Offset(0, 7).Resize(1, 2), _
.Offset(0, 5), .Cells).Copy _
Destination:=rngPaste
End With

????


In article ,
Curt wrote:

have not used union before trying following not good HELP
Thanks

Union(Range(Target.Offset(0,-11,8,7,5))),target.offset(0,0).Copy _
Destination:=rngPaste
What I want to do is to copy cells -11,8,7,5 and the target cell. The target
cell is text all others are numeric. Target cell is the trigger for this.

Thanks Again

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default union range

What I want to do is to copy cells -11,8,7,5 and the target cell. The target
cell is text all others are numeric. Target cell is the trigger for this.
Does the (0 ,5), .cells).copy take in the target cell
This is what I have
Dim wksSummary As Worksheet
Dim rngPaste As Range
Set wksSummary = Sheets("Announcer")
Set rngPaste = wksSummary.Cells(65536, "A").End(xlUp).Offset(1, 0)
Application.EnableEvents = False
Set rngPaste = rngPaste.Offset(1, 0)
Union(Range(Target.Offset(0, -11, 8, 7, 5)), Range(Target)).Copy _
Destination:=rngPaste

Will try your example
Thanks Again


"JE McGimpsey" wrote:

The VBA Offset method only takes 2 arguments (see VBA Help), so it's
hard to see what you're trying to do here, or even how many cells you're
trying to copy...

Perhaps:

With Target
Union(.Offset(0, -11), .Offset(0, 7).Resize(1, 2), _
.Offset(0, 5), .Cells).Copy _
Destination:=rngPaste
End With

????


In article ,
Curt wrote:

have not used union before trying following not good HELP
Thanks

Union(Range(Target.Offset(0,-11,8,7,5))),target.offset(0,0).Copy _
Destination:=rngPaste
What I want to do is to copy cells -11,8,7,5 and the target cell. The target
cell is text all others are numeric. Target cell is the trigger for this.

Thanks Again




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default union range

But what does

cells -11,8,7,5 and the target cell

mean to you? It doesn't make sense as VBA.

Is it 5 different cells: e.g.,

(1) target
(2) target.Offset(-11, 0) or target.Offset(0, -11)
(3) target.Offset(8, 0) or target.Offset(0, 8)
(4) target.Offset(7, 0) or target.Offset(0, 7)
(5) target.Offset(5, 0) or target.Offset(0, 5)


Or is it three cells: e.g., target, target.Offset(-11, 8) and
target.Offset(7, 5)?


Or are you referring to some variant of the worksheet function: e.g.,

target and target.Offset(-11, 8).Resize(7, 5)

or something else entirely?

In article ,
Curt wrote:

What I want to do is to copy cells -11,8,7,5 and the target cell.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default union range

Try to make more clear if I can The Target cell isin Column (L)or 12 -11
being (A)
-8 being (D) -7 being(E) -5 being(G) I got idea that any cell to left of
target was a minus (-) (L)or 12 would make (K) (0,-1)(J)(0,-2) target is (0)
in count ?
If I follow your responce then I must list each cell in offset group correct?
All of you that respond have a lot to get an understanding of what another
is doing.
Thanks
"JE McGimpsey" wrote:

But what does

cells -11,8,7,5 and the target cell

mean to you? It doesn't make sense as VBA.

Is it 5 different cells: e.g.,

(1) target
(2) target.Offset(-11, 0) or target.Offset(0, -11)
(3) target.Offset(8, 0) or target.Offset(0, 8)
(4) target.Offset(7, 0) or target.Offset(0, 7)
(5) target.Offset(5, 0) or target.Offset(0, 5)


Or is it three cells: e.g., target, target.Offset(-11, 8) and
target.Offset(7, 5)?


Or are you referring to some variant of the worksheet function: e.g.,

target and target.Offset(-11, 8).Resize(7, 5)

or something else entirely?

In article ,
Curt wrote:

What I want to do is to copy cells -11,8,7,5 and the target cell.


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default union range


Union(Target.Offset(0, -11), Target.Offset(0, 8), _
Target.Offset(0, 7), Target.Offset(0, 5), _
Target).Copy Destination:=rngPaste

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Curt" wrote in message
...
Try to make more clear if I can The Target cell isin Column (L)or 12 -11
being (A)
-8 being (D) -7 being(E) -5 being(G) I got idea that any cell to left of
target was a minus (-) (L)or 12 would make (K) (0,-1)(J)(0,-2) target is
(0)
in count ?
If I follow your responce then I must list each cell in offset group
correct?
All of you that respond have a lot to get an understanding of what another
is doing.
Thanks
"JE McGimpsey" wrote:

But what does

cells -11,8,7,5 and the target cell

mean to you? It doesn't make sense as VBA.

Is it 5 different cells: e.g.,

(1) target
(2) target.Offset(-11, 0) or target.Offset(0, -11)
(3) target.Offset(8, 0) or target.Offset(0, 8)
(4) target.Offset(7, 0) or target.Offset(0, 7)
(5) target.Offset(5, 0) or target.Offset(0, 5)


Or is it three cells: e.g., target, target.Offset(-11, 8) and
target.Offset(7, 5)?


Or are you referring to some variant of the worksheet function: e.g.,

target and target.Offset(-11, 8).Resize(7, 5)

or something else entirely?

In article ,
Curt wrote:

What I want to do is to copy cells -11,8,7,5 and the target cell.




  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default union range

Thanks Bob
much appreciated

"Bob Phillips" wrote:


Union(Target.Offset(0, -11), Target.Offset(0, 8), _
Target.Offset(0, 7), Target.Offset(0, 5), _
Target).Copy Destination:=rngPaste

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Curt" wrote in message
...
Try to make more clear if I can The Target cell isin Column (L)or 12 -11
being (A)
-8 being (D) -7 being(E) -5 being(G) I got idea that any cell to left of
target was a minus (-) (L)or 12 would make (K) (0,-1)(J)(0,-2) target is
(0)
in count ?
If I follow your responce then I must list each cell in offset group
correct?
All of you that respond have a lot to get an understanding of what another
is doing.
Thanks
"JE McGimpsey" wrote:

But what does

cells -11,8,7,5 and the target cell

mean to you? It doesn't make sense as VBA.

Is it 5 different cells: e.g.,

(1) target
(2) target.Offset(-11, 0) or target.Offset(0, -11)
(3) target.Offset(8, 0) or target.Offset(0, 8)
(4) target.Offset(7, 0) or target.Offset(0, 7)
(5) target.Offset(5, 0) or target.Offset(0, 5)


Or is it three cells: e.g., target, target.Offset(-11, 8) and
target.Offset(7, 5)?


Or are you referring to some variant of the worksheet function: e.g.,

target and target.Offset(-11, 8).Resize(7, 5)

or something else entirely?

In article ,
Curt wrote:

What I want to do is to copy cells -11,8,7,5 and the target cell.




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default union range

Forgot to mention in post. It looks like that once a offset of(,0, -11) is
set the rest are then counted from this point without the minus correct.

"Bob Phillips" wrote:


Union(Target.Offset(0, -11), Target.Offset(0, 8), _
Target.Offset(0, 7), Target.Offset(0, 5), _
Target).Copy Destination:=rngPaste

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Curt" wrote in message
...
Try to make more clear if I can The Target cell isin Column (L)or 12 -11
being (A)
-8 being (D) -7 being(E) -5 being(G) I got idea that any cell to left of
target was a minus (-) (L)or 12 would make (K) (0,-1)(J)(0,-2) target is
(0)
in count ?
If I follow your responce then I must list each cell in offset group
correct?
All of you that respond have a lot to get an understanding of what another
is doing.
Thanks
"JE McGimpsey" wrote:

But what does

cells -11,8,7,5 and the target cell

mean to you? It doesn't make sense as VBA.

Is it 5 different cells: e.g.,

(1) target
(2) target.Offset(-11, 0) or target.Offset(0, -11)
(3) target.Offset(8, 0) or target.Offset(0, 8)
(4) target.Offset(7, 0) or target.Offset(0, 7)
(5) target.Offset(5, 0) or target.Offset(0, 5)


Or is it three cells: e.g., target, target.Offset(-11, 8) and
target.Offset(7, 5)?


Or are you referring to some variant of the worksheet function: e.g.,

target and target.Offset(-11, 8).Resize(7, 5)

or something else entirely?

In article ,
Curt wrote:

What I want to do is to copy cells -11,8,7,5 and the target cell.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bringing in a Union Query with excel? S Davis Excel Worksheet Functions 3 August 24th 06 06:52 PM
Intersection, union and difference paulinoluciano Excel Worksheet Functions 2 May 3rd 06 10:51 AM
printing Union of Ranges anny Excel Worksheet Functions 2 January 26th 06 10:22 AM
UNION of Arrays - is possible? Marina Limeira Excel Discussion (Misc queries) 1 January 22nd 06 12:38 PM
Help w/ Union Queries Jenn Excel Discussion (Misc queries) 1 January 12th 05 01:07 AM


All times are GMT +1. The time now is 05:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"