+ Reply to Thread
Results 1 to 2 of 2

Excel changes celle when copying ?

  1. #1
    -[::::Shamran::::]-
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: 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::::]-" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1