View Single Post
  #2   Report Post  
Nick Hodge
 
Posts: n/a
Default

MayJay

To actually replace a value in a cell would require code as you could not
use a function to replace a referenced value. What you could do is use an IF
function in another columns which could then replace the old data, so if you
are comparing say A1 on Sheet1 with A1 on Sheet2 you could use

=IF(A1=Sheet2!A1,A1,Sheet2!A1)

You could then copy this down Column A and anywhere where the data did not
agree you would have the value from Sheet2. This could then be copied and
Editpaste special...+Values over the original data

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"mayjay" wrote in message
...
I am trying to find a way to compare values in a specific cell on 2 sheets,
and if they are different values replace the value in the cell on sheet 1
with the value in the cell from sheet 2.