Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default merge excell data

I need to merge two excel docs. Both have the exact same colomns of
data. But I updated some of the cells in the new document. I need to
merge those new cells into the apropriate rows and leave all other data
unchanged in the old document.

Unfortunatly, there really is no reference in the old or new document
that points to the specific row with the cells that needs to be
updated.

I could specify the rows by number in each doc if need be.

Thanks,

Sam

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default merge excell data

Sam,
Would it be viable to do a cell by cell comparsion of old and
new and subsitute old with new where differences occur [this assumes same
number of rows/columns with only changes in cells in a row i.e no rows
deleted/added]?

Or better, are changes always in a few columns to limit the checking?

what are volumes involved (Rows/columns)

" wrote:

I need to merge two excel docs. Both have the exact same colomns of
data. But I updated some of the cells in the new document. I need to
merge those new cells into the apropriate rows and leave all other data
unchanged in the old document.

Unfortunatly, there really is no reference in the old or new document
that points to the specific row with the cells that needs to be
updated.

I could specify the rows by number in each doc if need be.

Thanks,

Sam


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default merge excell data

Hi Toppers, Thanks for the info!

Not same number of rows/columns. Not limited to rows or columns -
random.

Volume is small, rows x columns is 761x9 in the old doc. 37x9 in the
new doc.

Here is an example of what I did to help us both better understand the
issue that needs help.

Let's say I'd a worksheet with 100 rows and 10 columns. Lets say the
columns are respectivly for last name, first name, street, etc.... and
each row is a diferent contact.

In each row, some of the data was incorect. Wether it be the name,
street, or whatever. Some of the rows had incorect data in random
cells.

I took, for example sake, 25 random rows, with incorect data somewhere,
and put them into a new excel doc. THey were not consecutive rows. I
then gave it to someone to update whatever they found to be incorect in
whatever cell.

I now need to merge the new data back into the old document in it's
correct row.

Thanks,

Sam

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default merge excell data

Sam,
I think we might have to resort your your semi-automated method
of supplying the row numbers. Construct a list of old (original) numbers and
the new ... say in columns A and B in one of the documents and then we can
loop through this list and replace.

Code in your "old" workbook ("Thisworkbook") could be along these lines:

For i=1 to 37
oldrow=worksheets("Sheet2").Range("a" & i)
newrow=worksheets("Sheet2").Range("B" & i)

ThisworkbookWorksheets("Sheet1").rows(oldrow)=Work books("Newbook").Worksheets("Sheet1").rows(newrow)
Next i

HTH

" wrote:

Hi Toppers, Thanks for the info!

Not same number of rows/columns. Not limited to rows or columns -
random.

Volume is small, rows x columns is 761x9 in the old doc. 37x9 in the
new doc.

Here is an example of what I did to help us both better understand the
issue that needs help.

Let's say I'd a worksheet with 100 rows and 10 columns. Lets say the
columns are respectivly for last name, first name, street, etc.... and
each row is a diferent contact.

In each row, some of the data was incorect. Wether it be the name,
street, or whatever. Some of the rows had incorect data in random
cells.

I took, for example sake, 25 random rows, with incorect data somewhere,
and put them into a new excel doc. THey were not consecutive rows. I
then gave it to someone to update whatever they found to be incorect in
whatever cell.

I now need to merge the new data back into the old document in it's
correct row.

Thanks,

Sam


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default merge excell data

One of the problems with sorting through the new rows and old rows is,
row 15 in the new book could be row 65 in the old book.

I gota admit, I'm not really sure what you mean - you are definitly
more advanced than me.

I guess what your saying is sort the old workbook so the rows in
question are numbered 1-37 equaling the new workbooks row 1-37

Then run a macro with:

For i=1 to 37
oldrow=worksheets("Sheet2").Range("a" & i)
newrow=worksheets("Sheet2").Range("B" & i)


ThisworkbookWorksheets("Sheet1").rows(oldrow)=Work books("Newbook").Workshee*ts("Sheet1").rows(newrow )

Next i


???

thakns for the help.

Sam



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
How do I merge two cells but keeping all contents in Excell? gysl Excel Discussion (Misc queries) 2 November 1st 05 07:16 AM
how do i set up a list of customers in excell for mail merge Redford Excel Discussion (Misc queries) 3 August 26th 05 04:53 PM
F7 in zip field when doing mail merge from excell file kshinn15 Excel Discussion (Misc queries) 0 April 16th 05 09:52 PM
help with excell to outlook for mail merge gripon Excel Worksheet Functions 2 March 14th 05 05:16 PM
Using the mail merge function from excell Sheila Excel Discussion (Misc queries) 1 February 18th 05 11:45 PM


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