LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Name Range, Variable # of Rows, Compare data, then Keep or delete

Greetings:
I hope someone has the patience to help work the following thru with me.
(assuming my descriptions make sense)

I'm looking to do something like the following:
Check Cell A2; Determine how many rows down are exactly same as A1;
Select A2 down to last equal cell and across all columns; Name Range
Within Range: check Column "AZ";
Employee number to be identical in each cell of column AZ, within that range.

If NOT, delete complete range. Process same procedure on next Range.
If YES, then leave complete range alone, and continue to next Range and
repeat process.
SAMPLE
A AZ
1 Job # Employ #
2 2489 113
3 2489 113
4 2489 228
5 2489 113
6 2650 220
7 2650 295
8 2650 331
9 2722 222
10 2722 222

1st range would be A2 / AZ5: (all the same Job Number)
The range would be deleted, since there is more than one employee identified
on that job
2nd range: A6 / AZ8: All Same Job Numbers, but, again more than one employee.
Delete that range, as well
3rd Range: A9 / AZ10: Same job number - Only ONE employee listed on that
job.
Keep the range intact, and move onto next range (which would be A11 / AZ ???

Etc.,........., until there are no more rows to process.

Any help would be greatly appreciated.
 
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
Macro to delete blank rows in a data range Youlan Excel Discussion (Misc queries) 5 September 17th 08 08:51 AM
Compare columns, delete the rows that DO match. ryguy7272 Excel Programming 2 May 20th 07 04:34 PM
Compare and Delete rows in EXcel Please help in building a Vba in excel Excel Programming 3 March 22nd 07 03:00 AM
compare two worksheets and delete rows [email protected] Excel Programming 6 May 27th 06 12:41 AM
Delete all Rows in a Variable Range John[_78_] Excel Programming 3 June 30th 04 06:13 PM


All times are GMT +1. The time now is 12:19 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"