Macro for active row operations

yabahut23

New Member
Joined
Sep 20, 2022
Messages
2
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
Hello,

Could you please help me with one macro for excel? I think that it is easy, but I can't find the effective solution.

I have very big excel sheet where is many columns and I make similar operation many time per day, so I'm looking for the macro solution.

I need macro, which will on ACTIVE row delete value in column J, then change value in column N to "Done" and after that insert actual date and time (D.M.YY h:mm) in to column O.

I need to run only on active row. So If I have selected cell E8613, then macro will run mentioned operations only on row 8613. If I have selected cell D2562, than macro runs only on row 2562. etc.

Could you please help me with this?

Thanks a lot for all your advices.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
try:
VBA Code:
Sub ActiveRow()
    Dim x As Long
    x = ActiveCell.Row
    Range("J" & x).ClearContents
    Range("N" & x) = "Done"
    Range("O" & x) = Now()
End Sub
 
Upvote 0
Solution
try:
VBA Code:
Sub ActiveRow()
    Dim x As Long
    x = ActiveCell.Row
    Range("J" & x).ClearContents
    Range("N" & x) = "Done"
    Range("O" & x) = Now()
End Sub
Thanks a lot for your help.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top