Checkbox to insert date in other column

Kevo85

New Member
Joined
Feb 5, 2025
Messages
6
Office Version
  1. 365
Good morning!

I would like when I click the checkbox in column K, that today's date appears in column L. Also I would like that this date be static (won't update when I reopen the file on another date) (It is ok to update the date if I unclick and click again).

I am using checkbox (Excel Menu - Insert - Checkbox (controls).

Thank you
 
Good morning!

I would like when I click the checkbox in column K, that today's date appears in column L. Also I would like that this date be static (won't update when I reopen the file on another date) (It is ok to update the date if I unclick and click again).

I am using checkbox (Excel Menu - Insert - Checkbox (controls).

Thank you
Try this.

The date will clear when the checkbox is cleared and place the date in the cell to the right when the checkbox is checked.

There is a checkbox there but it does not show in mini-sheets., see image.

Checkbox to insert date in other column.xlsm
JKLM
1
212/02/2025
3
412/02/2025
512/02/2025
612/02/2025
7
812/02/2025
9
10
Sheet1


1739376281934.png


Put this code in the worksheet code module.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
  
  If Not Intersect(Target, ActiveSheet.Range("K:K")) Is Nothing Then
  
    If Target.Value = True Then
    
      With Target.Offset(0, 1)
      
        .Value = Date
        
        .NumberFormat = "DD/MM/YYYY"
      
      End With
    
    Else
    
      Target.Offset(0, 1).ClearContents
      
    End If
    
  End If
  
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,226,771
Messages
6,192,918
Members
453,766
Latest member
Gskier

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