ActiveCell.Offset - copy range

  • Hello,
    Can i convert this

    Code
    ActiveCell.Offset(-1, 0).Copy
                   With ActiveCell
                .PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
                    SkipBlanks:=False, Transpose:=False
                .ClearOutline
            End With


    So that i can copy/paste the Offset range such as (-1,-2) (-1,1)?
    Thank you,
    Stefan

  • Re: ActiveCell.Offset - copy range


    I understand your code, but not what you want to do with this:


    Quote from StefanG

    So that i can copy/paste the Offset range such as (-1,-2) (-1,1)?


    How should it shape a range?


    Wigi

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

  • Re: ActiveCell.Offset - copy range


    Hi Wigi,
    Thank you for your reply/question.
    I wanted to copy a range above the active cell. The shape/range is between 1 row up 2 cells left to 1 row up 1 cell right - for a total of 4 cells, i.e. active cell is C2, the shape/range were to be A1:D1.
    Stefan

  • Re: ActiveCell.Offset - copy range


    Then use


    Code
    ActiveCell.Offset(-1, -2).Resize(1, 4).Copy 
    With ActiveCell
        .PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ 
        SkipBlanks:=False, Transpose:=False 
        .ClearOutline 
    End With


    Wigi

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!