ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting a Whole User Defined Row Using VBA (https://www.excelbanter.com/excel-programming/352750-selecting-whole-user-defined-row-using-vba.html)

Mikey2005

Selecting a Whole User Defined Row Using VBA
 

Afternoon all,

How is it possible to get VBA to select a user defined row (Defined in
Insert - Name - Define) Copy the row and insert the copied cells
below.... Its for a huge report I'm working on...

It's prooving to be quite a dilemer and i cant crack it, if you need an
example or any further data then happy to provide... Please HELP!
:confused:

Thanks in advance

Mike


--
Mikey2005
------------------------------------------------------------------------
Mikey2005's Profile: http://www.excelforum.com/member.php...o&userid=31316
View this thread: http://www.excelforum.com/showthread...hreadid=510015


Don Guillett

Selecting a Whole User Defined Row Using VBA
 
try
Sub copynamedrowandinsert()
ActiveCell.EntireRow.Insert
Range("myrow").Copy Cells(ActiveCell.Row, 1)
End Sub

--
Don Guillett
SalesAid Software

"Mikey2005" wrote
in message ...

Afternoon all,

How is it possible to get VBA to select a user defined row (Defined in
Insert - Name - Define) Copy the row and insert the copied cells
below.... Its for a huge report I'm working on...

It's prooving to be quite a dilemer and i cant crack it, if you need an
example or any further data then happy to provide... Please HELP!
:confused:

Thanks in advance

Mike


--
Mikey2005
------------------------------------------------------------------------
Mikey2005's Profile:
http://www.excelforum.com/member.php...o&userid=31316
View this thread: http://www.excelforum.com/showthread...hreadid=510015




Mikey2005[_2_]

Selecting a Whole User Defined Row Using VBA
 

Thanks...

I cant quite get this to work because im adding it to script i already
have and cant quite tie it together...

Whole cenario is i have a tab with 2 rows of data on... one on row *10*
and one on row *20* for instance. I need these data sources to grow....
so the macro will copy row *10*, insert and paste the data below in a
new row. Same for row *20*, the problem occurs when on running it a
second time it copys row *20* again, when because of the insert above
by row 10 it effectivly needs to look for row *21* copy insert and
paste....???

Thanks Again...


--
Mikey2005
------------------------------------------------------------------------
Mikey2005's Profile: http://www.excelforum.com/member.php...o&userid=31316
View this thread: http://www.excelforum.com/showthread...hreadid=510015



All times are GMT +1. The time now is 01:20 PM.

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