ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create macro to paste rows of text cells to lower end of other row (https://www.excelbanter.com/excel-programming/350862-create-macro-paste-rows-text-cells-lower-end-other-row.html)

RodFerd

Create macro to paste rows of text cells to lower end of other row
 
I have a set of four rows for each day of the week having several fixed text
columns. How do I write a macro to add further weeks to the end of the
previous week?

Tim Williams

Create macro to paste rows of text cells to lower end of other row
 
To find the first empty cell in a column you can use (eg)

***************
dim c as range, s as worksheet
set s=thisworkbook.sheets("Sheet1")
set c = s.cells(s.rows.count,1).end(xlUp).offset(1,0)
***************


c would be the first empty cell in column A

Tim




"RodFerd" wrote in message
...
I have a set of four rows for each day of the week having several fixed
text
columns. How do I write a macro to add further weeks to the end of the
previous week?




RodFerd

Create macro to paste rows of text cells to lower end of other
 
Tim,

Many thanks for the reply. I tried write in your code a macro, but it did
not work; the cursor did not move. Here is what I wrote:

Sub Addon()
'
'Addon Macro
'Macro recorded 20/01/2006 by Rod
'
'Keyboard Shortcut: Ctrl+t

Dim c As Range, s As Worksheet
Set s = ThisWorkbook.Sheets("Sheet1")
Set c = s.Cells(s.Rows.Count, 1).End(xlUp).Offset(1, 0)

End Sub

Any suggestions?

Cheers,

Rod

"Tim Williams" wrote:

To find the first empty cell in a column you can use (eg)

***************
dim c as range, s as worksheet
set s=thisworkbook.sheets("Sheet1")
set c = s.cells(s.rows.count,1).end(xlUp).offset(1,0)
***************


c would be the first empty cell in column A

Tim




"RodFerd" wrote in message
...
I have a set of four rows for each day of the week having several fixed
text
columns. How do I write a macro to add further weeks to the end of the
previous week?





Tim Williams

Create macro to paste rows of text cells to lower end of other
 
The code I posted was just one part of what you'd need: it's not supposed to
move the cursor.
Your problem isn't described in enough detail to provide much more than
that.
Post more details if you need more help.

Tim

"RodFerd" wrote in message
...
Tim,

Many thanks for the reply. I tried write in your code a macro, but it did
not work; the cursor did not move. Here is what I wrote:

Sub Addon()
'
'Addon Macro
'Macro recorded 20/01/2006 by Rod
'
'Keyboard Shortcut: Ctrl+t

Dim c As Range, s As Worksheet
Set s = ThisWorkbook.Sheets("Sheet1")
Set c = s.Cells(s.Rows.Count, 1).End(xlUp).Offset(1, 0)

End Sub

Any suggestions?

Cheers,

Rod

"Tim Williams" wrote:

To find the first empty cell in a column you can use (eg)

***************
dim c as range, s as worksheet
set s=thisworkbook.sheets("Sheet1")
set c = s.cells(s.rows.count,1).end(xlUp).offset(1,0)
***************


c would be the first empty cell in column A

Tim




"RodFerd" wrote in message
...
I have a set of four rows for each day of the week having several fixed
text
columns. How do I write a macro to add further weeks to the end of the
previous week?








All times are GMT +1. The time now is 03:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com