VB Code modification Assistance Requested

Marcie Be

Board Regular
Joined
Jun 25, 2020
Messages
124
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Fluff you kindly wrote the VB code that I have modified with the help of my Niece, that does exactly what I want.
I need it to work with a further 4 cells
It currently populates AN when Cell I4 has a date entered
I would also like it to populate AS, AX,BC and BH
I am wondering if I only want these other cells populated under certain conditions do those conditions need to be included in the VB code, or can that be managed some other way?
See VB Code below
Thank you in advance

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.CountLarge > 1 Then Exit Sub
If Target.Column = 10 Then
If IsEmpty(Target.Value) Then
Range("AN" & Target.Row).Value = ""
Else
Range("AN" & Target.Row).Value = Date
End If
End If
End Sub
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
It currently populates AN when Cell I4 has a date entered
The code you posted doesn't do what you describe, what is actually does is put today's date in column AN on the same row if you type a value into column 10 which is column J.
To answer your question yes you do need to add the conditions if you want the code to populate other columns. Note that you current code doesn't have any conditions it always does it unless you enter a blank
 
Upvote 0

Forum statistics

Threads
1,214,974
Messages
6,122,536
Members
449,088
Latest member
RandomExceller01

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