View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Doug Doug is offline
external usenet poster
 
Posts: 460
Default Transferring data between worksheets?

Yes, New sheet is updated and the old one is now a backup record.

If it is found in the old backup record in column M then I would like it to
automatically transfer over data for that row from columns A-G.
--
Have a great day!


"Patrick Molloy" wrote:

so spreadsheet newsheet is the updated sheet, spreadsheet oldsheet is the
backup

compare each item in newsheet column M and if it exists in oldsheet column M
copy what? the entire row ?

sub copydata
dim cell as range
dim rw as long
for each cell in newsheet.Range("M:M").Cells
if not isempty(cell) then
rw = found(cell)
if rw < 0 then
'copy something fro row rw in oldsheet to the row
cell.row of newsheet
end if
end if
next

end sub
function found(cell as range) as long
on error resume next
found = worksheetfunction.match(cell.value, oldsheet.Range("M:M"),false
on error goto 0
end function





"Doug" wrote in message
...
After making a backup copy and importing new web data, I need a way to
transfer my old notes to the new imported web data. Some of the rows get
dropped from the new imported data but I would like a formula that can
figure
out the rows that still match the old data and put the comments back into
the
appropriate cells.

In VBA I make a copy of a worksheet to another workbook as a backup. Then
it
imports new web data to update my old. Much of this new data remains the
same
and I would like to be able to transfer comments that I have made from the
old data that matches the rows of the new. I tried using vlookup, but it
leaves the formula in the cell that I will later need to type in, and it
also
says that vlookup looks for a lookup value in the leftmost column of the
table. Unfortunately the lookup value that I am using is to the right of
the
columns with the data I would like to have transferred over and could
never
get it to work.

Here is an example.

I am needing column M2-M200 in the backup that matches the rows that are
still listed in the updated original (M2-M200) to transfer the columns A-G
over without leaving behind formulas in the cells of my updated sheet.
This
is just a once a day,one time transfer of data and I close the backup when
I
am done.
Is there any way to have this data that matches the rows of previous data
to
be transferred without me doing it manually?
--
Hope your having a good day!