Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Dynamically adding data after the last column

I want to do the following

Set a dynamic range name of USED Range
First row is row 30
First column is column A
Last column is the last column of data in row 30.
Last row is the last row of data in the last column.

Once that named range is defned, I want to copy the data in the last column
of data over one column.

AND ... I want to do this all programmatically or with a predefined range
name.

Can someone assist?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Dynamically adding data after the last column

Dim R As Range
Set R = Range("A30", Range("A30").End(xlToRight).End(xlDown))
--
Charles Chickering

"A good example is twice the value of good advice."


"Barb Reinhardt" wrote:

I want to do the following

Set a dynamic range name of USED Range
First row is row 30
First column is column A
Last column is the last column of data in row 30.
Last row is the last row of data in the last column.

Once that named range is defned, I want to copy the data in the last column
of data over one column.

AND ... I want to do this all programmatically or with a predefined range
name.

Can someone assist?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Dynamically adding data after the last column

That answered the first part of my question. What do I need to do to copy
the data over one column from the last column?

"Charles Chickering" wrote:

Dim R As Range
Set R = Range("A30", Range("A30").End(xlToRight).End(xlDown))
--
Charles Chickering

"A good example is twice the value of good advice."


"Barb Reinhardt" wrote:

I want to do the following

Set a dynamic range name of USED Range
First row is row 30
First column is column A
Last column is the last column of data in row 30.
Last row is the last row of data in the last column.

Once that named range is defned, I want to copy the data in the last column
of data over one column.

AND ... I want to do this all programmatically or with a predefined range
name.

Can someone assist?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Dynamically adding data after the last column

Thanks. That answered part of it. What I really want to do is select the
range of cells that is one cell immediately to the right of this range. How
do I do that?


"Charles Chickering" wrote:

Dim R As Range
Set R = Range("A30", Range("A30").End(xlToRight).End(xlDown))
--
Charles Chickering

"A good example is twice the value of good advice."


"Barb Reinhardt" wrote:

I want to do the following

Set a dynamic range name of USED Range
First row is row 30
First column is column A
Last column is the last column of data in row 30.
Last row is the last row of data in the last column.

Once that named range is defned, I want to copy the data in the last column
of data over one column.

AND ... I want to do this all programmatically or with a predefined range
name.

Can someone assist?

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Dynamically adding data after the last column

Sry, Missed that.
Dim R As Range
Set R = Range("A30", Range("A30").End(xlToRight).End(xlDown))
Range(R.Cells(1, R.Columns.Count), R.Cells(R.Rows.Count, _
R.Columns.Count)).Copy R.Cells(1, R.Columns.Count).Offset(, 1)
--
Charles Chickering

"A good example is twice the value of good advice."


"Barb Reinhardt" wrote:

That answered the first part of my question. What do I need to do to copy
the data over one column from the last column?

"Charles Chickering" wrote:

Dim R As Range
Set R = Range("A30", Range("A30").End(xlToRight).End(xlDown))
--
Charles Chickering

"A good example is twice the value of good advice."


"Barb Reinhardt" wrote:

I want to do the following

Set a dynamic range name of USED Range
First row is row 30
First column is column A
Last column is the last column of data in row 30.
Last row is the last row of data in the last column.

Once that named range is defned, I want to copy the data in the last column
of data over one column.

AND ... I want to do this all programmatically or with a predefined range
name.

Can someone assist?

Thanks

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
Dynamically adding a macro to a new worksheet Fred Russell Excel Programming 4 September 11th 05 10:31 PM
Dynamically adding code Martin Walke Excel Programming 2 October 21st 04 12:18 PM
Adding Pivot Tables Dynamically DavidW Excel Programming 0 May 4th 04 09:16 AM
Dynamically adding data to a Combobox? samanathon Excel Programming 4 April 5th 04 11:26 AM
Adding button dynamically lagodch Excel Programming 1 October 7th 03 10:14 PM


All times are GMT +1. The time now is 09:32 PM.

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"