PC Review


Reply
Thread Tools Rate Thread

Copying ranges to various locations

 
 
=?Utf-8?B?TWVtZW50bw==?=
Guest
Posts: n/a
 
      29th Jun 2007
Ok guys,

I'm struggeling a while already with this one,

I have 15 ranges with a medium size. At first the worksheet is empty, and
there's a button on it "New user". Basically the idea is when a new user is
introduced, one could hit the button, give the name of the user, and the
range "UserRange" gets pasted into the location, next to previously inserted
user.

Basically you'll have an empty sheet, you click on the button, a inputbox
asks for a username, the range gets copied in (if the sheet is still empty,
starting from cel A1). The following should get copied in at cel H4, next O4,
V4, AC4 so we get 5 users next to each other. After that we start a new row
of 5 users at A13 through AC13, and eventually the last row with 5 users
starting from A22, H22, O22, V22 and AC22. So now we have 15 users in a 3 x 5
setup.

The UserRange itself is a already made ready on another worksheet ("code"),
so i just copy that range to this worksheet, and i insert the correct
username.

I've been experimenting with Cells(..., ...).End etc... but without much
luck. Is what I am trying to do still doable? Or should i go for another
approach?

Any suggestions, tips or ideas....

Thanks in advance.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      29th Jun 2007
Everything you are asking for can be done. I think the prblem you are having
is the difference between cells (one cells) and range (multiple cells).

Here are some examples of cels and range

cells(Row,Column)
cells(1,1)
cells(1,"A")


set myrange = range("A1:C10")
set myrange = range(cells(firstrow,firstcolumn),cells(Lastrow,lastcolumn))

The cells in range can have the same format as individual cells

By setting a range you can use the range name instead of using range

range("A1:C10").select
myrange.select


"Memento" wrote:

> Ok guys,
>
> I'm struggeling a while already with this one,
>
> I have 15 ranges with a medium size. At first the worksheet is empty, and
> there's a button on it "New user". Basically the idea is when a new user is
> introduced, one could hit the button, give the name of the user, and the
> range "UserRange" gets pasted into the location, next to previously inserted
> user.
>
> Basically you'll have an empty sheet, you click on the button, a inputbox
> asks for a username, the range gets copied in (if the sheet is still empty,
> starting from cel A1). The following should get copied in at cel H4, next O4,
> V4, AC4 so we get 5 users next to each other. After that we start a new row
> of 5 users at A13 through AC13, and eventually the last row with 5 users
> starting from A22, H22, O22, V22 and AC22. So now we have 15 users in a 3 x 5
> setup.
>
> The UserRange itself is a already made ready on another worksheet ("code"),
> so i just copy that range to this worksheet, and i insert the correct
> username.
>
> I've been experimenting with Cells(..., ...).End etc... but without much
> luck. Is what I am trying to do still doable? Or should i go for another
> approach?
>
> Any suggestions, tips or ideas....
>
> Thanks in advance.

 
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
Copying sheets without copying named ranges NMACK08 Microsoft Excel Programming 1 5th Feb 2008 08:53 PM
Which is faster, copying range to another set of ranges or copying tomemory? axwack Microsoft Excel Programming 2 12th Dec 2007 01:19 PM
Copying ranges Don Lloyd Microsoft Excel Programming 4 11th Aug 2005 11:19 PM
Copying multiple cells formula and paste as Values in same locations William Poh Ben Microsoft Excel Misc 1 28th Nov 2003 09:27 PM
Copying ranges brym Microsoft Excel Programming 8 19th Jul 2003 04:27 PM


Features
 

Advertising
 

Newsgroups
 


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