Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default How do I Compare common fields to update a Master table

Thanks for the fun stuff. We really enjoy the group and your code
examples.
I have an Excel 2003 file with a Master table worksheet with named
fields, let's call it "Master". It is the dynamic result of many
report files.

I receive periodic reports based on an Excel report template I created
that has a worksheet with most of the same named fields as the Master,
let's call it "Report". The "Master" records have a couple of extra
special purpose fields that the "Report" records do not.

The "Report" template also has a configuration worksheet with a couple
of fields unique to this report. "Partner" which contains the name of
the person reporting and "ReportDate" which is the date this "Report"
template was sent. The "Partner" and the "ReportDate" values need to
be added/edited to NEW records when they are added/edited to the
"Master".

I need to append/update an Excel "Master" table by evaluating the
records in other Excel "Report" files (weekly reports) containing a
template worksheet with a similar structure and mostly the same named
fields/columns structure.

I use two common fields/columns as a unique recordIDs to use as a
unique comparison ID between the records in the "Master" and "Report"
files. A field in both "Master" and "Report" worksheets named
"PipeDate" (short date format) and a field in both "Master" and
"Report" worksheets named "Prospect" (text format, which for example
contains a company name.) Programmatically concatenating these two
fields together should give me enough of a unique recordID for my
comparison purposes.

When the "Report: template is received it will contain;
1. some new records (records NOT currently in the "Master" table),
2. some unchanged records (records in the "Master" table and the
"Report" file that match in all common fields)
3. some old records where one or more fields have been updated in the
"Report".

I wish to append the NEW records, those where the "PipeDate&Prospect"
unique ID in a "Report" record do NOT match any record in the "Master"
table. For each NEW record appended to the "Master" I need to add the
"Partner" template value from to the "Partner" field in each NEW
appended record and add the "ReportDate" value to a field named
"LastUpDate" (short date) which is only in the record once it is
appended to the "Master" table. (Later I may try and write code that
will update this field to NOW in the "Report" template IF the user
changes any field at any time. Then I can just capture this date as
part of the update evaluation process)

I wish to inspect all other "Report" template records and compare
field by field to existing records in the "Master". If no difference
are observed in ANY common fields then no change to the "LastUpDate"
date value in the "Master".

If inspection of the template record reveals ANY different data value
in any common field for a record already in the "Master" table then I
want to update the "Master" table with the latest/best data from the
report record and change the value in the "Master" table field
"LastUpDate" to the "ReportDate" in the "Report" template to track
when this record was last updated.

Don't know if others have similar needs but I have needed this skill
for a couple of different projects. Easier to do using Access but my
client wishes to keep this all in Excel.

Appreciate any help, suggestions, guidance, cosmic thoughts, etc.....

Dennis

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
One partial table, one master table - update the partial boilermaker Excel Discussion (Misc queries) 3 May 28th 10 08:33 PM
filtering common fields Ajit Munj Excel Discussion (Misc queries) 0 May 14th 07 01:58 PM
[pivottables] multiple table selection fields update in one click... [email protected] Excel Discussion (Misc queries) 1 September 22nd 06 02:42 AM
Pivot Table - Compare 2 fields? Erin Excel Discussion (Misc queries) 0 June 1st 06 08:28 PM
Compare master list and update [email protected] Excel Programming 2 August 29th 05 05:24 PM


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