Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Help to modify a Marco

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Georgia USA
    Posts
    569
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have this Marco below, how do I make sure the active cell is in column D before the Marco runs, I don't need a row number just need to be sure it is in column D, if not in column D I need to exit the sub and do nothing. Thanks for your help, PS what's your opinion on the new board? I think it will be better in the long run.

    Sub not_building_number()
    Application.ScreenUpdating = False
    ActiveCell.Offset(0, 3).Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Application.CutCopyMode = False
    ActiveCell.Offset(0, -5).Select
    Selection.FillRight
    ActiveCell.Offset(0, 2).Select
    Application.ScreenUpdating = True
    End Sub

  2. #2
    New Member
    Join Date
    Feb 2002
    Location
    Birmingham
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Put

    If Not ActiveCell.Column=4 Then
    Exit Sub
    end if

    at the start of your macro.

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Georgia USA
    Posts
    569
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks Gary worked great!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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