Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Need Help with checking records

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Need Help with checking records

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
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
Spreadsheet - Deleting Duplicate Records - Self Checking APV-onlyownerknowinganyIT Excel Worksheet Functions 1 January 26th 10 11:05 PM
Delete records when certain records have duplicate column data JVroom New Users to Excel 1 January 26th 09 06:23 PM
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Checking and IF ? mohamadhafiz Excel Worksheet Functions 5 June 26th 07 11:04 PM
Checking for duplicate records / rows Hru48 Excel Discussion (Misc queries) 2 February 26th 06 11:12 PM


All times are GMT +1. The time now is 12:27 PM.

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"