PC Review


Reply
Thread Tools Rate Thread

Clearing the Contents of a range of cells

 
 
=?Utf-8?B?RGF2aWQgQS4=?=
Guest
Posts: n/a
 
      8th Nov 2007
I am trying to use some kind of offset to clearcontents of a range of cells
I have Names in Column A but they are not listed one other the other. Some
have more rows between them the the others. I need to be able to clear the
contents of the rows based on what is in column A.
Kinda like:
Sub ClearQAScoresPage()
Dim rng As Range
Sheets("Sheet1").Select
Set myrng = Worksheets("Sheet1").Range("A:A")
For Each c In myrng
If c.Value <> "" Then
Clear the cells.................??????/
myrng.ClearContents
End If
Next
End Sub
How do I select the cells based on an offset.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      8th Nov 2007
I am a little lost. If the contents of a cell in column A are blank then you
want to clear the contents of the entire row? One other question... Is column
A full of formulas that return either a name or a blank or is column A full
of name values?
--
HTH...

Jim Thomlinson


"David A." wrote:

> I am trying to use some kind of offset to clearcontents of a range of cells
> I have Names in Column A but they are not listed one other the other. Some
> have more rows between them the the others. I need to be able to clear the
> contents of the rows based on what is in column A.
> Kinda like:
> Sub ClearQAScoresPage()
> Dim rng As Range
> Sheets("Sheet1").Select
> Set myrng = Worksheets("Sheet1").Range("A:A")
> For Each c In myrng
> If c.Value <> "" Then
> Clear the cells.................??????/
> myrng.ClearContents
> End If
> Next
> End Sub
> How do I select the cells based on an offset.

 
Reply With Quote
 
=?Utf-8?B?RGF2aWQgQS4=?=
Guest
Posts: n/a
 
      8th Nov 2007
Column "A" has names
I need to clear the cells to the right of that name and the cells below it.
Lets say A2 has Joe Person in it, I need to clear B2 through M6, then I need
the macro to go down to the next name and clear the cells to the right of
that name.
the next name may be in A34 and its information that needs to be cleared is
B34 through M35.
And so on.....

"Jim Thomlinson" wrote:

> I am a little lost. If the contents of a cell in column A are blank then you
> want to clear the contents of the entire row? One other question... Is column
> A full of formulas that return either a name or a blank or is column A full
> of name values?
> --
> HTH...
>
> Jim Thomlinson
>
>
> "David A." wrote:
>
> > I am trying to use some kind of offset to clearcontents of a range of cells
> > I have Names in Column A but they are not listed one other the other. Some
> > have more rows between them the the others. I need to be able to clear the
> > contents of the rows based on what is in column A.
> > Kinda like:
> > Sub ClearQAScoresPage()
> > Dim rng As Range
> > Sheets("Sheet1").Select
> > Set myrng = Worksheets("Sheet1").Range("A:A")
> > For Each c In myrng
> > If c.Value <> "" Then
> > Clear the cells.................??????/
> > myrng.ClearContents
> > End If
> > Next
> > End Sub
> > How do I select the cells based on an offset.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clearing contents from a range G. Yamada Microsoft Excel Programming 13 25th Sep 2008 07:45 PM
Clearing the Contents of Merged Cells prizm1 Microsoft Excel New Users 2 10th Sep 2005 04:42 AM
clearing the contents of specified cells Jimmy Pop Microsoft Excel Programming 5 27th May 2005 01:17 AM
Clearing the contents of unbound cells =?Utf-8?B?QmVsbGU=?= Microsoft Access 3 20th Jan 2005 03:03 PM
Re: Clearing the contents of merged cells Doug Glancy Microsoft Excel Programming 0 23rd Apr 2004 08:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:04 PM.