Change in one cell adds a date to another cell,,,

V L

New Member
Joined
Jul 25, 2024
Messages
15
Office Version
  1. 365
  2. 2021
  3. 2019
Platform
  1. Windows
Hello All: I need some VBA to do the following. This VBA needs to run on one tab only. I make a change to the contents in cell C17. I would like the change in C17 to then set the date in cell S4. Hopefully this is clear.

V L...
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Enter a value in C17 and press the ENTER key.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.CountLarge > 1 Then Exit Sub
    If Intersect(Target, Range("C17")) Is Nothing Then Exit Sub
    Range("S4") = Date
End Sub
 
  • Like
Reactions: V L
Upvote 0
Solution
what you are asking is not too clear but for what I understand this code might help you

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 3 And Target.Row = 17 Then
        Range("S4").Value = Date
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,118
Members
453,021
Latest member
Justyna P

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