Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Copying ranges to various locations

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Copying ranges to various locations

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,la stcolumn))

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
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
Copying ranges Don Lloyd Excel Programming 4 August 11th 05 11:19 PM
Copying into ranges carlito_1985 Excel Worksheet Functions 1 June 20th 05 03:23 AM
copying ranges etc chick-racer[_43_] Excel Programming 0 November 27th 03 02:33 PM
copying ranges from different workbook phillip harrison Excel Programming 0 July 24th 03 02:34 PM
Copying ranges brym Excel Programming 8 July 19th 03 04:27 PM


All times are GMT +1. The time now is 12:39 PM.

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

About Us

"It's about Microsoft Excel"