$$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread tangledweb
Before running a program that puts the results onto a sheet I want to clear that sheet from the previous run. Easy to just clear a huge range, but really wanted to do it right and clear the used range. I tried to find a way to use the usedrange value but could not determine how to exclude the h

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Maries
Try it, Sheets("Results").Cells.ClearContents On Fri, Apr 6, 2012 at 3:29 AM, tangledweb wrote: > Results -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Probl

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Maries
*Sheets("Results").Range("A2:A" & ActiveSheet.UsedRange.Rows.Count).Clear* On Fri, Apr 6, 2012 at 3:36 AM, Maries wrote: > Try it, > > Sheets("Results").Cells.ClearContents > > > > On Fri, Apr 6, 2012 at 3:29 AM, tangledweb wrote: > >> Results > > > -- FORUM RULES (986+ members already BANNE

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Domain Admin
That clears the header row too. I need to keep that row intact. On Thu, Apr 5, 2012 at 4:36 PM, Maries wrote: > Try it, > > Sheets("Results").Cells.ClearContents > > > > On Fri, Apr 6, 2012 at 3:29 AM, tangledweb wrote: >> >> Results > > > -- > FORUM RULES (986+ members already BANNED for viola

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Maries
Try it now,* Sheets("Results").Range("A2:A" & ActiveSheet.UsedRange.Rows.Count).Clear* On Fri, Apr 6, 2012 at 3:42 AM, Domain Admin wrote: > That clears the header row too. I need to keep that row intact. > > On Thu, Apr 5, 2012 at 4:36 PM, Maries wrote: > > Try it, > > > > Sheets("Results").

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread dguillett1
w to clear all but the header row efficiently Before running a program that puts the results onto a sheet I want to clear that sheet from the previous run. Easy to just clear a huge range, but really wanted to do it right and clear the used range. I tried to find a way to use the usedrange value

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Domain Admin
That clears column A but not the other columns. Also can you explain this syntax? I assume the part of the range statement in quotes specifies column 2 from row 2 down? But I am not sure what the & ... is doing. I am guessing it returns the number of rows in the used range and that is needed to m

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Domain Admin
Don Guillett > Microsoft MVP Excel > SalesAid Software > dguille...@gmail.com > > From: tangledweb > Sent: Thursday, April 05, 2012 6:29 PM > To: excel-macros@googlegroups.com > Subject: $$Excel-Macros$$ how to clear all but the header row efficiently > > Before runn

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Domain Admin
Thursday, April 05, 2012 6:29 PM >> To: excel-macros@googlegroups.com >> Subject: $$Excel-Macros$$ how to clear all but the header row efficiently >> >> Before running a program that puts the results onto a sheet I want to clear >> that sheet from the previous

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Maries
clearallbuttoprow() > >> Sheets("Results").UsedRange.Offset(1).Clear > >> End Sub > >> > >> Don Guillett > >> Microsoft MVP Excel > >> SalesAid Software > >> dguille...@gmail.com > >> > >> From: tangledweb >

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Domain Admin
w() >> >> Sheets("Results").UsedRange.Offset(1).Clear >> >> End Sub >> >> >> >> Don Guillett >> >> Microsoft MVP Excel >> >> SalesAid Software >> >> dguille...@gmail.com >> >> >> >

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-05 Thread Domain Admin
t >>> >> >>> >> sub clearallbuttoprow() >>> >> Sheets("Results").UsedRange.Offset(1).Clear >>> >> End Sub >>> >> >>> >> Don Guillett >>> >> Microsoft MVP Excel >>> >> Sales

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-06 Thread dguillett1
Try it. YES!! Don Guillett Microsoft MVP Excel SalesAid Software dguille...@gmail.com -Original Message- From: Domain Admin Sent: Thursday, April 05, 2012 7:03 PM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ how to clear all but the header row efficiently And

Re: $$Excel-Macros$$ how to clear all but the header row efficiently

2012-04-06 Thread Domain Admin
nt: Thursday, April 05, 2012 7:03 PM > To: excel-macros@googlegroups.com > Subject: Re: $$Excel-Macros$$ how to clear all but the header row > efficiently > > > And would offset(0,1) mean skip the first column? > > On Thu, Apr 5, 2012 at 5:01 PM, Domain Admin wrote: >>