automatic date and time

hansfrimpong

New Member
Joined
May 17, 2009
Messages
2
I have a Mac excel program and I want to program the work sheet templete that automatically logs in the date in column and time on colum B any time I insert and information in column C,D and E. the date and time should not change when i open that file on another day. Can anybody help?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Welcome to MrExcel Board....

not sure about mac but try this
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$1" Then
    Range("A1").Formula = Date
    Range("B1").Formula = Now()
    Range("A1").NumberFormat = "m/d/yyyy"
    Range("B1").NumberFormat = "h:mm"
End If
End Sub

place this code in the worksheet you want this to work in, by right clicking on that sheet tab and select view code, then paste this in
 
Upvote 0
I use mac Excel 2008 and when I click the "sheet" tab I couldn't find the "view code". How do I use VBA on mac excel 2008.
 
Upvote 0
sorry I don't know mac - you might have to do a google search. Or maybe someone here will know
 
Upvote 0
There is no VBA in Mac Excel 2008 so you're stuck unless you can find a way to do this using the Mac programming language.
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

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