How to automatically fill text if text in another cell is changed or added

SunnyAlv

Active Member
Joined
May 23, 2023
Messages
262
Office Version
  1. 365
Platform
  1. Windows
I am a beginner when it comes to using VBA EXCEL, i hope u can help me

VBA Question

please see image below

1703233587075.png



I just want to know how to fill the day (TODAY) in each cell in column "A" if :

1. Columns C - F have been filled with text but have changed (in whatever form the essence has changed)

2. every time a new item is added to the last row


***adding the date (TODAY) according to the row the item was changed/new item added


Thank U :)
 

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.
See if the following gives you what you want. As it is worksheet event code, you add it by right-clicking on the sheet tab, select View Code & place the code in the window that appears on the right of the screen. You'll need to save the file as macro-enabled or binary format thereafter.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Row > 1 And Not Intersect(Range("C:F"), Target) Is Nothing Then
        Application.EnableEvents = False
        Cells(Target.Row, 1) = Date
        End If
    Application.EnableEvents = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,217,411
Messages
6,136,469
Members
450,015
Latest member
excel_beta_345User

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