deleteing a range from one cell within it? |
|
Author |
Message |
mx6bfast
|
Posted: Mon Aug 22 00:01:02 CDT 2005 |
Top |
Excel Programming >> deleteing a range from one cell within it?
Hello, all-
I'm trying to select and delete a range of cells, based on one cell
contained within the range. Can someone suggest a remedy? Basically, it is from
a time sheet for multiple people, and each person is a 12 row by 15 column
range, repeated down the worksheet. I want to select the employee's number,
delete that person's range and close up the remaining cells. Thanks in advance,
I'm pretty frustrated right now.
Greg Little
glittle.at.sprynet.com
Excel188
|
|
|
|
|
PY
|
Posted: Mon Aug 22 00:01:02 CDT 2005 |
Top |
Excel Programming >> deleteing a range from one cell within it?
If the emp nr is top left corner,
range(activecell,activecell.Offset(12,1)).EntireRow.delete
should work
> Hello, all-
> I'm trying to select and delete a range of cells, based on one cell
> contained within the range. Can someone suggest a remedy? Basically, it is from
> a time sheet for multiple people, and each person is a 12 row by 15 column
> range, repeated down the worksheet. I want to select the employee's number,
> delete that person's range and close up the remaining cells. Thanks in advance,
> I'm pretty frustrated right now.
>
> Greg Little
> glittle.at.sprynet.com
>
|
|
|
|
|
Rowan
|
Posted: Mon Aug 22 00:06:02 CDT 2005 |
Top |
Excel Programming >> deleteing a range from one cell within it?
Range(ActiveCell, ActiveCell.Offset(11, 1)).EntireRow.Delete
will prevent you deleting the first row of the next employee.
Regards
Rowan
> If the emp nr is top left corner,
> range(activecell,activecell.Offset(12,1)).EntireRow.delete
> should work
>
>
> > Hello, all-
> > I'm trying to select and delete a range of cells, based on one cell
> > contained within the range. Can someone suggest a remedy? Basically, it is from
> > a time sheet for multiple people, and each person is a 12 row by 15 column
> > range, repeated down the worksheet. I want to select the employee's number,
> > delete that person's range and close up the remaining cells. Thanks in advance,
> > I'm pretty frustrated right now.
> >
> > Greg Little
> > glittle.at.sprynet.com
> >
|
|
|
|
|
Greg
|
Posted: Mon Aug 22 00:41:26 CDT 2005 |
Top |
Excel Programming >> deleteing a range from one cell within it?
Yup, that does it, after offsetting to the top left corner from the key cell.
Thank you all , I spent WAY too much time trying to make it all harder than it
needed to be. Thanks again.
Greg Little
>Range(ActiveCell, ActiveCell.Offset(11, 1)).EntireRow.Delete
>
>will prevent you deleting the first row of the next employee.
>
>Regards
>Rowan
>
>
>> If the emp nr is top left corner,
>> range(activecell,activecell.Offset(12,1)).EntireRow.delete
>> should work
>>
>>
>> > Hello, all-
>> > I'm trying to select and delete a range of cells, based on one cell
>> > contained within the range. Can someone suggest a remedy? Basically, it is from
>> > a time sheet for multiple people, and each person is a 12 row by 15 column
>> > range, repeated down the worksheet. I want to select the employee's number,
>> > delete that person's range and close up the remaining cells. Thanks in advance,
>> > I'm pretty frustrated right now.
>> >
>> > Greg Little
>> > glittle.at.sprynet.com
>> >
|
|
|
|
|
Dave
|
Posted: Mon Aug 22 07:48:32 CDT 2005 |
Top |
Excel Programming >> deleteing a range from one cell within it?
It might be easier to read:
activecell.resize(12).entirerow.delete
But I think I'd add a little validation--just to make sure I'm on a correct
cell.
>
> Hello, all-
> I'm trying to select and delete a range of cells, based on one cell
> contained within the range. Can someone suggest a remedy? Basically, it is from
> a time sheet for multiple people, and each person is a 12 row by 15 column
> range, repeated down the worksheet. I want to select the employee's number,
> delete that person's range and close up the remaining cells. Thanks in advance,
> I'm pretty frustrated right now.
>
> Greg Little
> glittle.at.sprynet.com
--
Dave Peterson
|
|
|
|
|
|
|