ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel macro, editing recorded cell.. not current (https://www.excelbanter.com/excel-programming/350211-excel-macro-editing-recorded-cell-not-current.html)

TroyT

Excel macro, editing recorded cell.. not current
 
So I recorded a Macro... and I want it to be able to edit values next to the
current cell, not the ones i recorded the macro on.

here is the macro file..


Range("K3").Select
Selection.Insert Shift:=xlDown
Range("K3:L3").Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Range("I4").Select


Tom Ogilvy

Excel macro, editing recorded cell.. not current
 

ActiveCell.Offset(0,1).Insert Shift:=xlDown
With ActiveCell.Resize(1,2).Interior
.ColorIndex = 6
.Pattern = xlSolid
End With


--
Regards,
Tom Ogilvy


"TroyT" wrote in message
...
So I recorded a Macro... and I want it to be able to edit values next to

the
current cell, not the ones i recorded the macro on.

here is the macro file..


Range("K3").Select
Selection.Insert Shift:=xlDown
Range("K3:L3").Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Range("I4").Select





All times are GMT +1. The time now is 01:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com