2 worksheet open, one is macro coding and the other one is being coded.
How do I code date and time on another sheet. Alternative to code below.
![]()
Please Login or Register to view this content.
2 worksheet open, one is macro coding and the other one is being coded.
How do I code date and time on another sheet. Alternative to code below.
![]()
Please Login or Register to view this content.
You will have to replace the workbook and worksheet with the proper reference
![]()
Please Login or Register to view this content.
Change the sheet name to suit.
Sheets("Sheet2").Range("A2").FormulaR1C1 = "=NOW()"
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
I did. Neither one of these works.
Group is name of my workbook and the sheet![]()
Please Login or Register to view this content.
1. MACRO.XLSM
2. GROUP.XLSM
coding on MACRO.XLSM to put todays date on cell A2 of GROUP.XLSM. Not put =NOW() on cell A2.
so when user open GROUP.XLMS next week, A2 will show dates of today.
A formula of =NOW() is today's date. The formula changes the date every day.
yes I know.
I want to date the worksheet.
Right now, only thing I can think of is that =now() and save it as PDF, but I would really like to save it as XLSM.
I also save it's name to Group 1003.XLSM by using![]()
Please Login or Register to view this content.
Something like this?
![]()
Please Login or Register to view this content.
Workbooks("Group 1003.XLSM").Sheets("Sheet2").Range("A2").Value = Date
ok, that worked. So use Date instead of Now.
Now, if I open the workbook tomorrow, A2 should be dated today 10/3 not 10/4 correct?
Correct. You could use Date for the date only or Now for the current date and time.
Either of these works
instead of![]()
Please Login or Register to view this content.
I was using![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Simply try..
Formula:
Please Login or Register to view this content.
Regards,
Vikas Gautam
Excel-buzz.blogspot.com
Excel is not a matter of Experience, its a matter of Application.
Say Thanks, Click * Add Reputation
Thank you, that's ok it's working now.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks