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

I have a macro adding a row. I need to copy this to the row above it. My
problem is I don't know how to refer to the row above it when it will change
row number all the time as rows will be added constantly.How would I do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Range of Cells

With ActiveCell

.EntireRow.Copy .Offset(-1, 1 - .Column)
End With


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"OrlaLynch" wrote in message
...
I have a macro adding a row. I need to copy this to the row above it. My
problem is I don't know how to refer to the row above it when it will
change
row number all the time as rows will be added constantly.How would I do
this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Range of Cells

That worked perfectly, thank you, I've been trying to figure this out for a
long time!thats great!

"Bob Phillips" wrote:

With ActiveCell

.EntireRow.Copy .Offset(-1, 1 - .Column)
End With


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"OrlaLynch" wrote in message
...
I have a macro adding a row. I need to copy this to the row above it. My
problem is I don't know how to refer to the row above it when it will
change
row number all the time as rows will be added constantly.How would I do
this?




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
loop through cells in a range and pick up corresponding cell values in another range [email protected] Excel Programming 9 October 19th 06 05:11 AM
how to compute a range of cells based on another range of cells? HAROLD Excel Worksheet Functions 1 December 30th 05 09:32 PM
how to compute a range of cells based on another range of cells? HAROLD Excel Worksheet Functions 2 December 30th 05 07:55 PM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 PM
Copy a formula to a range of cells via VB6 using .Range(Cells(row,col), Cells(row,col)).Formula= statement Kevin Excel Programming 7 October 5th 04 08:11 PM


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