Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default deleteing a range from one cell within it?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default 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

"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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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

"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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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.


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleteing objects Debi Excel Discussion (Misc queries) 2 January 16th 07 06:25 PM
Deleteing koba Excel Discussion (Misc queries) 2 November 25th 05 04:11 AM
Deleteing some Rows Deepwater Excel Discussion (Misc queries) 1 April 1st 05 06:23 PM
Deleteing Rows Michael Vaughan Excel Programming 2 September 20th 04 09:53 PM
Deleteing Rows Amber[_2_] Excel Programming 3 February 4th 04 06:34 PM


All times are GMT +1. The time now is 07:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"