Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default range adding


Hello guys,

I need your help ... with my code.

I have a small table (1 column, 7 rows ) in my sheet.
After click on command button I need to create(copy) the same one righ
next to the original... Thats no problem for me. It is simple copying.

The problem I can not cope with is adding the table (right next t
previous)after each click.

I hope I explain myself clearly.

Thanks for your kind contributions

--
Toma
-----------------------------------------------------------------------
Toman's Profile: http://www.excelforum.com/member.php...fo&userid=3139
View this thread: http://www.excelforum.com/showthread.php?threadid=52094

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default range adding

Hi
Not quiote sure if this is what you mean but try

Sub tester()
With Selection
.Copy Destination:=.Offset(0, 1)
.Offset(0, 1).Select
End With
End Sub

This will copy the selected range one column to the right, then select
that range. As you keep clicking the button further copies will be
copied to the right and so on.

regards
Paul

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default range adding

Dim cell As Range

For Each cell In Range("A1:A7")
cell.Offset(0, 1).Value = cell.Offset(0, 1).Value + cell.Value
Next cell


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Toman" wrote in
message ...

Hello guys,

I need your help ... with my code.

I have a small table (1 column, 7 rows ) in my sheet.
After click on command button I need to create(copy) the same one right
next to the original... Thats no problem for me. It is simple copying.

The problem I can not cope with is adding the table (right next to
previous)after each click.

I hope I explain myself clearly.

Thanks for your kind contributions.


--
Toman
------------------------------------------------------------------------
Toman's Profile:

http://www.excelforum.com/member.php...o&userid=31397
View this thread: http://www.excelforum.com/showthread...hreadid=520942



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default range adding


Thank you boys.

I didnīt know how to incorporate "offset".
The first contribution solves exactly what I meant.
It appears very easy NOW:)


--
Toman
------------------------------------------------------------------------
Toman's Profile: http://www.excelforum.com/member.php...o&userid=31397
View this thread: http://www.excelforum.com/showthread...hreadid=520942

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
Adding a range Josh Excel Discussion (Misc queries) 1 November 2nd 09 11:15 PM
Adding a Range Joey041 Excel Worksheet Functions 1 November 21st 06 09:23 AM
Adding named range gives error "method range of object _Global failed " Gunnar Johansson Excel Programming 3 August 10th 04 01:54 PM
adding reference-to-range control to excel range Nir Sfez Excel Programming 1 March 2nd 04 06:11 PM
sheets.range and adding cells that are out of the range Phillips Excel Programming 1 November 18th 03 09:27 PM


All times are GMT +1. The time now is 12:11 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"