Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I am writing a code that can clear everything starting from a named cell to the end of the sheet. The situation like this.. ---------- | START_1 | <---Named cell ---------- Table 1 goes here ---------- | START_2 | <---Named cell ---------- Table 2 goes here .. and so on. I wish to clear everything from START_1 to the end of the sheet. I need to clear even the named cells. I tried a recorded macro to clear all. But that doesn't clear the named cells. Any ideas or suggestions...Thanks in advance for your advice.. Shishi |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
This worked for me (Xl2003) to clear columns A to C where Range("Start") is first named cell in Column A : Range(Range("Start"), Cells(Cells(Rows.Count, "C").End(xlUp).Row, "C")).Clear "shishi" wrote: Hi all, I am writing a code that can clear everything starting from a named cell to the end of the sheet. The situation like this.. ---------- | START_1 | <---Named cell ---------- Table 1 goes here ---------- | START_2 | <---Named cell ---------- Table 2 goes here .. and so on. I wish to clear everything from START_1 to the end of the sheet. I need to clear even the named cells. I tried a recorded macro to clear all. But that doesn't clear the named cells. Any ideas or suggestions...Thanks in advance for your advice.. Shishi |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range
set rng = Range(range("Start_1").Row & ":65536")EntireRow.Delete On Error Resume Next for each nm in ActiveWorkbook.Names if Instr(1,nm.Refersto,"#Ref",vbTextCompare) then nm.Delete end if Next On Error goto 0 -- Regards, Tom Ogilvy "shishi" wrote in message oups.com... Hi all, I am writing a code that can clear everything starting from a named cell to the end of the sheet. The situation like this.. ---------- | START_1 | <---Named cell ---------- Table 1 goes here ---------- | START_2 | <---Named cell ---------- Table 2 goes here .. and so on. I wish to clear everything from START_1 to the end of the sheet. I need to clear even the named cells. I tried a recorded macro to clear all. But that doesn't clear the named cells. Any ideas or suggestions...Thanks in advance for your advice.. Shishi |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Tom. It really worked.
shishi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Transfer a name from one cell to another but leave clear if clear? | Excel Worksheet Functions | |||
Why Doesn't it Clear?? | Excel Discussion (Misc queries) | |||
clear the clear the web page email attachment lines | Excel Discussion (Misc queries) | |||
Not clear | Excel Discussion (Misc queries) | |||
Clear all? | Excel Discussion (Misc queries) |