Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default add and remove rows from a called range

I have a range A1:D3 called "range" and I need to add rows to this range
( A1:D3 = A1:D4 = A1:D5)
and I need to remove them too. How should I do this?

Thank you


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default add and remove rows from a called range

set rng = Range("A1:D3")
rng.rows(rng.rows.count).Insert shift:=xlShiftDown
? rng.Address
$A$1:$D$4

if you mean a named range
set rng = Range("A1:D3")
rng.name = "Range"
? Range("Range").Address
$A$1:$D$3
Range("Range").Rows(Range("Range").Rows.Count).Ins ert Shift:=xlShiftDown
? rng.Address
$A$1:$D$4
? Range("Range").Address
$A$1:$D$4

--
Regards,
Tom Ogilvy


"Buddy Lee" wrote in message
...
I have a range A1:D3 called "range" and I need to add rows to this range
( A1:D3 = A1:D4 = A1:D5)
and I need to remove them too. How should I do this?

Thank you




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default add and remove rows from a called range

thank you and I'm sorry for my english :)

--

icq 25372592
"Tom Ogilvy" pí¹e v diskusním pøíspìvku
...
set rng = Range("A1:D3")
rng.rows(rng.rows.count).Insert shift:=xlShiftDown
? rng.Address
$A$1:$D$4

if you mean a named range
set rng = Range("A1:D3")
rng.name = "Range"
? Range("Range").Address
$A$1:$D$3
Range("Range").Rows(Range("Range").Rows.Count).Ins ert Shift:=xlShiftDown
? rng.Address
$A$1:$D$4
? Range("Range").Address
$A$1:$D$4

--
Regards,
Tom Ogilvy


"Buddy Lee" wrote in message
...
I have a range A1:D3 called "range" and I need to add rows to this range
( A1:D3 = A1:D4 = A1:D5)
and I need to remove them too. How should I do this?

Thank you






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default add and remove rows from a called range

Maybe I missed it, but what about removing rows? From the range object only,
and not from the worksheet as well as Range.Delete would do?

Thanks,

Anton

"Buddy Lee" wrote:

thank you and I'm sorry for my english :)

--

icq 25372592
"Tom Ogilvy" pÃ*¹e v diskusnÃ*m pøÃ*spìvku
...
set rng = Range("A1:D3")
rng.rows(rng.rows.count).Insert shift:=xlShiftDown
? rng.Address
$A$1:$D$4

if you mean a named range
set rng = Range("A1:D3")
rng.name = "Range"
? Range("Range").Address
$A$1:$D$3
Range("Range").Rows(Range("Range").Rows.Count).Ins ert Shift:=xlShiftDown
? rng.Address
$A$1:$D$4
? Range("Range").Address
$A$1:$D$4

--
Regards,
Tom Ogilvy


"Buddy Lee" wrote in message
...
I have a range A1:D3 called "range" and I need to add rows to this range
( A1:D3 = A1:D4 = A1:D5)
and I need to remove them too. How should I do this?

Thank you







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
remove rows in one sheet from similar rows in another G[_2_] Excel Worksheet Functions 0 November 12th 07 03:57 PM
How to remove a lot of rows? Please help User Excel Discussion (Misc queries) 2 April 30th 06 08:39 PM
macro to remove a named range always called "database" & if possib Todd F.[_2_] Excel Programming 9 July 25th 05 06:25 PM
range.find method called into a VBA function (problem) Eros Pedrini Excel Programming 5 November 17th 04 12:34 PM
Excel called from external app (OLE) stops after processing exactly 10921 rows Peter Gloor Excel Programming 6 March 5th 04 03:38 PM


All times are GMT +1. The time now is 12:02 AM.

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"