![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com