Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good Morning
I need help or an idea a user gets a excel workbook from a programme called smartstream which shows records that has changed, I has written code to check for new records and write them to an access table I also need to check if records have changed if so update that record in the table. The problem is that a record number can be in the db more than once, the records has a ID with autonumber on but not in the excel sheet. any help will be much appricated. Charles |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you sort the column with the ID's then you can simply
test & delete. The following code assumes the ID is in column "A" and deletes matches dim thisrow as long dim IDColumn as string IDColumn ="A" For thisrow = Range("A65000").End(xlUp).Row to 2 step -1 Do While Cells(thisrow,IDColumn).Value = _ Cells(thisrow-1,IDColumn).Value Rows(thisrow).Delete Loop Next thisrow The Do-Loop is req'd since a deleted row then requires the test to be done again. Patrick Molloy Microsoft Excel MVP -----Original Message----- Good Morning I need help or an idea a user gets a excel workbook from a programme called smartstream which shows records that has changed, I has written code to check for new records and write them to an access table I also need to check if records have changed if so update that record in the table. The problem is that a record number can be in the db more than once, the records has a ID with autonumber on but not in the excel sheet. any help will be much appricated. Charles . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Spreadsheet - Deleting Duplicate Records - Self Checking | Excel Worksheet Functions | |||
Delete records when certain records have duplicate column data | New Users to Excel | |||
Spell Checking with checking cell notes | Excel Discussion (Misc queries) | |||
Checking and IF ? | Excel Worksheet Functions | |||
Checking for duplicate records / rows | Excel Discussion (Misc queries) |