Naked Science Forum

Non Life Sciences => Geek Speak => Topic started by: ukmicky on 23/04/2008 01:25:29

Title: How do I set Excel to change the date automatically?
Post by: ukmicky on 23/04/2008 01:25:29
Please please please I'm hooked on and trying to teach myself excel and need help doing something .

I can change the date automtically in excel by typing in =today() in cell B2

However i would be prefer to change the date in B2 by creating a text box/ button so it updates only when i click on the button.


Howwwwwwww



Title: Re: How do I set Excel to change the date automatically?
Post by: DoctorBeaver on 23/04/2008 23:23:54
If I remember correctly, you can do it using events and form controls. I don't use Excel any more (OpenOffice rules!), but I'm sure that's how it's done. Check out macros, events, triggers and form controls in the help system.
Title: Re: How do I set Excel to change the date automatically?
Post by: MonikaS on 24/04/2008 13:27:35
You need to write a small macro:

Sub UpDateDate()
'
' UpDateDate
' made by MonikaS
'
      D = CDate(FormatDateTime(Now, vbShortDate))
      Range("B5").Value = D
End Sub


Attach this to a graphic on your spreedsheet and each time you click the graphic the date will change to the current date in cell B5.

HTH
Monika
Title: Re: How do I set Excel to change the date automatically?
Post by: ukmicky on 24/04/2008 22:27:00
You need to write a small macro:

Sub UpDateDate()
'
' UpDateDate
' made by MonikaS
'
      D = CDate(FormatDateTime(Now, vbShortDate))
      Range("B5").Value = D
End Sub





Attach this to a graphic on your spreedsheet and each time you click the graphic the date will change to the current date in cell B5.

HTH
Monika
Thankyou i will try it
Title: Re: How do I set Excel to change the date automatically?
Post by: DoctorBeaver on 25/04/2008 08:24:21
You need to write a small macro:

Sub UpDateDate()
'
' UpDateDate
' made by MonikaS
'
      D = CDate(FormatDateTime(Now, vbShortDate))
      Range("B5").Value = D
End Sub


Attach this to a graphic on your spreedsheet and each time you click the graphic the date will change to the current date in cell B5.

HTH
Monika

Yeah, you can do it that way if you really must  [:P]
Title: Re: How do I set Excel to change the date automatically?
Post by: MonikaS on 25/04/2008 09:30:58
Well, he wanted a button to click on [;D]
Without a button Crtl . (it's a dot) would insert the current date using the default datetime format.
Monika
Title: Re: How do I set Excel to change the date automatically?
Post by: DoctorBeaver on 25/04/2008 22:42:32
Well, he wanted a button to click on [;D]
Without a button Crtl . (it's a dot) would insert the current date using the default datetime format.
Monika

Button, Schmutton... oy vay!
Title: How do I set Excel to change the date automatically?
Post by: ukmicky on 26/04/2008 03:05:23
Thankyou MonikaS

It works brilliantly ,now i can click on a transparent box and it changes the date underneath  [8D]

Dont worry doc i know you would have figured it out for me sooner or later [::)]

Title: How do I set Excel to change the date automatically?
Post by: DoctorBeaver on 26/04/2008 16:52:11

Dont worry doc i know you would have figured it out for me sooner or later [::)]


I doubt it as I don't use Excel. I switched to OpenOffice a couple of years ago. I don't even have Excel on my PCs anymore.

I was sent an Excel spreadsheet a few days ago - 42k in size. I loaded it into OpenCalc and saved it in .ods format - 17k. That's 1 of the reasons I don't use Excel.

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back