Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there!
It's been about a billion years since I worked with Excel macros, I think that part of my brain has atrophied! I have some inventory data in an Excel spreadsheet, each item in the inventory is in a row of cells. There are multiple records for some items. If I sort the data block by part number first, then "date entered" second, I get the newest listing for each item first. I want to delete subsequent listings for the same item. There are about 18,000 rows in this spreadsheet, so this seems like a job tailor-made for a tidy little macro. Here's what I want to do in layman's terms. 1. Select the contiguous block of data 2. Sort the data first on column B (ascending) and second column L(descending) 3. Place the cursor at the top of column B 4. Read the value of the cell under the cursor into a register 5. Move the cursor down one cell 6. Does the cell under the cursor have the same information as the comparison registier? 7. If it does delete the line from the spreadsheet 8. If it does not,read the value of the cell under the cursor into a register 9. Go back to line 5, repeat How can I make this happen in a macro? Excel 2002 by the way. Thanks for your time! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula assistance required | Excel Worksheet Functions | |||
Urgent assistance required for excel | Excel Discussion (Misc queries) | |||
Vlookup Assistance required | New Users to Excel | |||
FORMULA ASSISTANCE REQUIRED | Excel Discussion (Misc queries) | |||
Assistance required | Excel Discussion (Misc queries) |