View Single Post
  #7   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Phillips Phillips is offline
external usenet poster
 
Posts: 48
Default best way to add worksheets together

There are currently about 15 different sheets.
I would like to be able to do this on a regular basis (once a month?)
I would like to have the records from one sheet as always being the
preferred, and then all others based on the date field (latest being the one
retainded)

I would like to have a macro. I was thinking about a
loop that would step through each sheet, look at each record, and then if
found in NewMaster, compare dates, if the date is later, then replace the
data, if the date is older, go to the next. If the record is not found, then
add it.

Does this sound like a proper (read "good") way of doing this?
How would I code this?




Thanks
Phil


"Anders S" wrote in message
...
Phil,

Still not enough info to deliver the "best way" if there ever is one.

How many sheets are there? Dozens, or just a limited number? Will you do
this once only or on a regular basis?

Assuming this is a once-only job on a limited number of sheets you can
- copy/paste all sheets into new master sheet - do not link
- sort on email and date
- identify the duplicates with a simple formula like
=IF(B3=B2,"X") (with email addresses in Col B)
- delete the duplicates

Post back with more details if you need a macro to automate the process.

HTH
Anders Silven


"Phillips" skrev i meddelandet
news:I5qvb.263842$HS4.2352893@attbi_s01...
All worksheets have the same structure, some have been split up for
different reasons, and I want to create a new "master" that has all of the
records.

Basically, I need to copy all of the records together, but by doing this,

I
would get many duplicate records. What I would like to do, is to have a

nice
clean empty worksheet, and then look at all of the other sheets in the
workbook, look at each record, if the record is not found, add it. If it

is
found, then look at the last modified date, and which ever date is the
latest, made sure that is the info that is in the master.I would be using
email address as a unique key. The date is a column label lastmodified.

HTH,
Phil

"Paul Robinson" wrote in message
om...
Hi Phil
Your question is far too vague.
regards
Paul

"Phillips" wrote in message

news:<z3dvb.259485$Tr4.807966@attbi_s03...
I have several worksheets and I would like to add them together.

I do not want to copy or create duplicats, and I want the one with the
latest date (LASTUPDATED is a date)

How would I do this?

Thanks
Phil