+ Reply to Thread
Results 1 to 2 of 2

Macro range cell

  1. #1
    Pieter
    Guest

    Macro range cell

    I recorded the macro below.
    Works fine only i have to stand on the cell in Column O.
    I want that the macro always start in Column O no matter wich cell
    i have selected in that row.

    Sub Macro2()
    '
    ' Selection.Copy
    ActiveCell.Offset(0, -2).Range("A1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
    SkipBlanks _
    :=False, Transpose:=False
    ActiveCell.Offset(0, 1).Range("A1").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "0"
    ActiveCell.Offset(0, 1).Range("A1").Select
    End Sub



  2. #2
    Bob Phillips
    Guest

    Re: Macro range cell

    Sub Macro2()

    Cells(ActiveCell.Row, "O").Offset(0, -2).Range("A1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, _
    nOperation:=xlNone, _
    SkipBlanks:=False, _
    Transpose:=False
    ActiveCell.Offset(0, 1).Range("A1").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "0"
    ActiveCell.Offset(0, 1).Range("A1").Select
    End Sub


    --

    HTH

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


    "Pieter" <[email protected]> wrote in message
    news:[email protected]...
    > I recorded the macro below.
    > Works fine only i have to stand on the cell in Column O.
    > I want that the macro always start in Column O no matter wich cell
    > i have selected in that row.
    >
    > Sub Macro2()
    > '
    > ' Selection.Copy
    > ActiveCell.Offset(0, -2).Range("A1").Select
    > Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
    > SkipBlanks _
    > :=False, Transpose:=False
    > ActiveCell.Offset(0, 1).Range("A1").Select
    > Application.CutCopyMode = False
    > ActiveCell.FormulaR1C1 = "0"
    > ActiveCell.Offset(0, 1).Range("A1").Select
    > End Sub
    >
    >




+ 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