Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Excel changes celle when copying ?

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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




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
Excel 2007 pivot chart/table copying vs Excel 2003 xpdnt1 Charts and Charting in Excel 0 May 6th 08 07:51 PM
copying the Hyperlink function result without copying the actual formula mcheng Excel Worksheet Functions 2 June 9th 07 02:43 AM
Come selezionare solo celle con font rosso con visualbasic Ivanobrb Excel Discussion (Misc queries) 2 September 18th 06 05:58 PM
Copying blank excel worksheet into additional excel workbooks Deb Excel Discussion (Misc queries) 10 February 4th 05 12:25 AM
colorize celle from a range of date sal21[_29_] Excel Programming 0 July 29th 04 08:06 PM


All times are GMT +1. The time now is 03:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"