VBA Code for new sheet

TCHME

New Member
Joined
Oct 30, 2010
Messages
10
I would like to have a code that, when I enter in the Date or (in this case I plan on using my initials) on sheet #1, a cell on sheet #2 would automatically have something enter in it.
I have a code for doing this on a sheet but I'm having troubles geting it to go to the other sheet .

Here is what I have so far

any ideas????


Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect([B10:B20], Target) Is Nothing Then
'HERE WE TARGET ROWS


Application.EnableEvents = False
Cells(Target.Row, 4) = "TCHME" 'you can put anything you want here
Cells(Target.Row, 6) = Now 'Now = Date and Time
Cells(Target.Row, 8) = "Excel Is Powerful" 'you can add a new line to add a different column

Application.EnableEvents = True


End If

If Not Intersect([B21:M21], Target) Is Nothing Then
' HERE WE TARGET COLUMN

Application.EnableEvents = False
Cells(23, Target.Column) = "TCHME" 'you can put anything you want here
Cells(25, Target.Column) = Now 'Now = Date and Time
Cells(27, Target.Column) = "Excel Is Powerful" 'you can add a new line to add a different column

Application.EnableEvents = True

End If

End Sub

 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,224,507
Messages
6,179,176
Members
452,893
Latest member
denay

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