• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help with simple macro

oiseanx

New Member
Hello,

Beginner excel user here and I'm trying to create a few simple macros for work. They work ok, except that once used I end up with the same cell (H19 in the example below)highlighted after each use.

How do I program/edit the macro so the highlighted cell is always the cell below where I just used he macro? (So if I used the macro in cell C7, the highlighted cell would be C8, rather than jumping to H19 every time)

Code:
Sub refused()
'
' refused Macro
' refused
'
' Keyboard Shortcut: Ctrl+Shift+I
'
  With Selection.Font
  .Color = -13408666
  .TintAndShade = 0
  End With
  ActiveCell.FormulaR1C1 = "refused"
  Range("H19").Select
End Sub
 
Last edited by a moderator:
Code:
Sub refused()
'
' refused Macro
' refused
'
' Keyboard Shortcut: Ctrl+Shift+I
'
 With Selection.Font
  .Color = -13408666
  .TintAndShade = 0
End With
ActiveCell.FormulaR1C1 = "refused"
Selection.Offset(1).Select
End Sub
 
Back
Top