PC Review


Reply
Thread Tools Rate Thread

copy range with different ranges.

 
 
fjs
Guest
Posts: n/a
 
      8th Jul 2007
How do I make a marco to copy one cell in to many cells without
knowing the starting of the range?

The start of the range will always be different, and the cell to be
copied will always be different.

EX: this time copy a1 to a2:a28

next time copy a5 to a6:a28

and the next time it could be a54 to a55:a150


The start of the range will always be the next cell that is being
copied.

Thanks.
Frank.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sk1C?=
Guest
Posts: n/a
 
      8th Jul 2007
One approach:

With Range("A1")
.Copy .Offset(1,0).Resize(27, 1)
End With


"fjs" wrote:

> How do I make a marco to copy one cell in to many cells without
> knowing the starting of the range?
>
> The start of the range will always be different, and the cell to be
> copied will always be different.
>
> EX: this time copy a1 to a2:a28
>
> next time copy a5 to a6:a28
>
> and the next time it could be a54 to a55:a150
>
>
> The start of the range will always be the next cell that is being
> copied.
>
> Thanks.
> Frank.
>
>

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      8th Jul 2007

Dim rng As Range
Set rng = ThisWorkbook.Sheets("Sheet1").Range("A5:A33") 'or whatever
rng.Value = rng.Cells(1).Value


Tim


"fjs" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How do I make a marco to copy one cell in to many cells without
> knowing the starting of the range?
>
> The start of the range will always be different, and the cell to be
> copied will always be different.
>
> EX: this time copy a1 to a2:a28
>
> next time copy a5 to a6:a28
>
> and the next time it could be a54 to a55:a150
>
>
> The start of the range will always be the next cell that is being
> copied.
>
> Thanks.
> Frank.
>



 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      8th Jul 2007
With great difficulty based upon those parameters.

You don't know the cell to copy nor the range to copy to.

Is there anything that could determine which cell to copy?

I see your pattern for the start point of the range to copy to but what would
determine the size of the range from there?


Gord Dibben MS Excel MVP

On Sat, 07 Jul 2007 20:42:56 -0700, fjs <(E-Mail Removed)> wrote:

>How do I make a marco to copy one cell in to many cells without
>knowing the starting of the range?
>
>The start of the range will always be different, and the cell to be
>copied will always be different.
>
>EX: this time copy a1 to a2:a28
>
> next time copy a5 to a6:a28
>
> and the next time it could be a54 to a55:a150
>
>
>The start of the range will always be the next cell that is being
>copied.
>
>Thanks.
>Frank.


 
Reply With Quote
 
fjs
Guest
Posts: n/a
 
      8th Jul 2007
That's the problem. The size of the range is based on orders. They
are always diferent.




On Jul 7, 11:59 pm, Gord Dibben <gorddibbATshawDOTca> wrote:
> With great difficulty based upon those parameters.
>
> You don't know the cell to copy nor the range to copy to.
>
> Is there anything that could determine which cell to copy?
>
> I see your pattern for the start point of the range to copy to but what would
> determine the size of the range from there?
>
> Gord Dibben MS Excel MVP
>
>
>
> On Sat, 07 Jul 2007 20:42:56 -0700, fjs <fshep...@netscape.ca> wrote:
> >How do I make a marco to copy one cell in to many cells without
> >knowing the starting of the range?

>
> >The start of the range will always be different, and the cell to be
> >copied will always be different.

>
> >EX: this time copy a1 to a2:a28

>
> > next time copy a5 to a6:a28

>
> > and the next time it could be a54 to a55:a150

>
> >The start of the range will always be the next cell that is being
> >copied.

>
> >Thanks.
> >Frank.- Hide quoted text -

>
> - Show quoted text -



 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      8th Jul 2007
Are these orders based upon a filtered list or something similar?

How do you currently select what data to copy and paste manually?

Gord

On Sat, 07 Jul 2007 21:19:17 -0700, fjs <(E-Mail Removed)> wrote:

>That's the problem. The size of the range is based on orders. They
>are always diferent.
>
>
>
>
>On Jul 7, 11:59 pm, Gord Dibben <gorddibbATshawDOTca> wrote:
>> With great difficulty based upon those parameters.
>>
>> You don't know the cell to copy nor the range to copy to.
>>
>> Is there anything that could determine which cell to copy?
>>
>> I see your pattern for the start point of the range to copy to but what would
>> determine the size of the range from there?
>>
>> Gord Dibben MS Excel MVP
>>
>>
>>
>> On Sat, 07 Jul 2007 20:42:56 -0700, fjs <fshep...@netscape.ca> wrote:
>> >How do I make a marco to copy one cell in to many cells without
>> >knowing the starting of the range?

>>
>> >The start of the range will always be different, and the cell to be
>> >copied will always be different.

>>
>> >EX: this time copy a1 to a2:a28

>>
>> > next time copy a5 to a6:a28

>>
>> > and the next time it could be a54 to a55:a150

>>
>> >The start of the range will always be the next cell that is being
>> >copied.

>>
>> >Thanks.
>> >Frank.- Hide quoted text -

>>
>> - Show quoted text -

>


 
Reply With Quote
 
fjs
Guest
Posts: n/a
 
      8th Jul 2007
Everything is copied and pasted manually right now. The orders are
based on a production run.
When(if) production gets behind, that is why the cell to get copied is
different, and the size of the to copied to range is also different.




On Jul 8, 10:07 am, Gord Dibben <gorddibbATshawDOTca> wrote:
> Are these orders based upon a filtered list or something similar?
>
> How do you currently select what data to copy and paste manually?
>
> Gord
>
>
>
> On Sat, 07 Jul 2007 21:19:17 -0700, fjs <fshep...@netscape.ca> wrote:
> >That's the problem. The size of the range is based on orders. They
> >are always diferent.

>
> >On Jul 7, 11:59 pm, Gord Dibben <gorddibbATshawDOTca> wrote:
> >> With great difficulty based upon those parameters.

>
> >> You don't know the cell to copy nor the range to copy to.

>
> >> Is there anything that could determine which cell to copy?

>
> >> I see your pattern for the start point of the range to copy to but what would
> >> determine the size of the range from there?

>
> >> Gord Dibben MS Excel MVP

>
> >> On Sat, 07 Jul 2007 20:42:56 -0700, fjs <fshep...@netscape.ca> wrote:
> >> >How do I make a marco to copy one cell in to many cells without
> >> >knowing the starting of the range?

>
> >> >The start of the range will always be different, and the cell to be
> >> >copied will always be different.

>
> >> >EX: this time copy a1 to a2:a28

>
> >> > next time copy a5 to a6:a28

>
> >> > and the next time it could be a54 to a55:a150

>
> >> >The start of the range will always be the next cell that is being
> >> >copied.

>
> >> >Thanks.
> >> >Frank.- Hide quoted text -

>
> >> - Show quoted text -- Hide quoted text -

>
> - Show quoted text -



 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      9th Jul 2007
I am unable to give you any pointers based on the information you have given in
this post or earlier postings.

Only you know which cell to copy and to where.


Gord

On Sun, 08 Jul 2007 12:50:12 -0700, fjs <(E-Mail Removed)> wrote:

>Everything is copied and pasted manually right now. The orders are
>based on a production run.
>When(if) production gets behind, that is why the cell to get copied is
>different, and the size of the to copied to range is also different.
>
>
>
>
>On Jul 8, 10:07 am, Gord Dibben <gorddibbATshawDOTca> wrote:
>> Are these orders based upon a filtered list or something similar?
>>
>> How do you currently select what data to copy and paste manually?
>>
>> Gord
>>
>>
>>
>> On Sat, 07 Jul 2007 21:19:17 -0700, fjs <fshep...@netscape.ca> wrote:
>> >That's the problem. The size of the range is based on orders. They
>> >are always diferent.

>>
>> >On Jul 7, 11:59 pm, Gord Dibben <gorddibbATshawDOTca> wrote:
>> >> With great difficulty based upon those parameters.

>>
>> >> You don't know the cell to copy nor the range to copy to.

>>
>> >> Is there anything that could determine which cell to copy?

>>
>> >> I see your pattern for the start point of the range to copy to but what would
>> >> determine the size of the range from there?

>>
>> >> Gord Dibben MS Excel MVP

>>
>> >> On Sat, 07 Jul 2007 20:42:56 -0700, fjs <fshep...@netscape.ca> wrote:
>> >> >How do I make a marco to copy one cell in to many cells without
>> >> >knowing the starting of the range?

>>
>> >> >The start of the range will always be different, and the cell to be
>> >> >copied will always be different.

>>
>> >> >EX: this time copy a1 to a2:a28

>>
>> >> > next time copy a5 to a6:a28

>>
>> >> > and the next time it could be a54 to a55:a150

>>
>> >> >The start of the range will always be the next cell that is being
>> >> >copied.

>>
>> >> >Thanks.
>> >> >Frank.- Hide quoted text -

>>
>> >> - Show quoted text -- Hide quoted text -

>>
>> - Show quoted text -

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how copy formula that contains ranges so ranges do not overlap Patty Microsoft Excel Worksheet Functions 1 20th Nov 2008 04:15 PM
x y scatter chart series ranges reset to x(range) = y(range) =?Utf-8?B?QnJha2VybTE5?= Microsoft Excel Charting 4 26th Sep 2006 11:13 PM
Copy data in named ranges to a newer version of the same template to identical ranges handstand Microsoft Excel Programming 0 21st Aug 2006 03:51 PM
compare ranges in different workbooks and copy "not matching values" at bottom of range 1 Kaza Sriram Microsoft Excel Programming 1 6th Aug 2004 07:47 PM
Compare ranges n copy at bottom of first range Kaza Sriram Microsoft Excel Programming 0 5th Aug 2004 02:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:19 AM.