Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the emp nr is top left corner,
range(activecell,activecell.Offset(12,1)).EntireRo w.delete should work "Greg Little" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range(ActiveCell, ActiveCell.Offset(11, 1)).EntireRow.Delete
will prevent you deleting the first row of the next employee. Regards Rowan "PY & Associates" wrote: If the emp nr is top left corner, range(activecell,activecell.Offset(12,1)).EntireRo w.delete should work "Greg Little" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "PY & Associates" wrote: If the emp nr is top left corner, range(activecell,activecell.Offset(12,1)).EntireRo w.delete should work "Greg Little" wrote: 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. Greg Little wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
deleteing objects | Excel Discussion (Misc queries) | |||
Deleteing | Excel Discussion (Misc queries) | |||
Deleteing some Rows | Excel Discussion (Misc queries) | |||
Deleteing Rows | Excel Programming | |||
Deleteing Rows | Excel Programming |