View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Excel changes celle when copying ?

That is presumably because the cell reference is absolute and you are
copying into a different row number.

You could modify the source formula to

=DATO.FORSKEL(Data!G$17;Data!B$17;"y")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"-[::::Shamran::::]-" wrote in message
...
When my macro is copying cells from sheet ! to sheet2 one of my cell

changes
?? In sheet1 The cell is lige this : =DATO.FORSKEL(Data!G17;Data!B17;"y")

In
sheet2 after copying the result is this:

=DATO.FORSKEL(Data!B7;Data!B2;"y").

My macro looks like this:

Sheets("Data").Select
With ActiveCell
Range(Cells(.Row, 18), Cells(.Row, 4)).Copy

Sheets("Beregning").Range("B4").PasteSpecial Paste:=xlAll, Transpose:=True

Regards

Jesper Rasmussen