IF I have in Cell A1 =Today() which will read today's date.
I need to have Cell B2 to read today's date from cell A1 BUT, tomorrow B2 date would stay the same, reading yesterday's date !
Is this possible?![]()
![]()
IF I have in Cell A1 =Today() which will read today's date.
I need to have Cell B2 to read today's date from cell A1 BUT, tomorrow B2 date would stay the same, reading yesterday's date !
Is this possible?![]()
![]()
Last edited by OceanBlue; 05-11-2011 at 12:27 AM.
If you need the date to be stagnant, why are you using the today function in the first place?
Post an sample spreadsheet of what you are looking to happen.
hi,
Are you just trying to save time from manually typing in the date once on the day it needs to be entered?
If so, here's a shortcut key combination for the date:
[ctrl + ;]
& one for time:
[ctrl + shift + ;]
(where the plus is intended to show that you hold all the keys down in the order listed)
If you "hardcode" the date in cell A1 using the above suggestion, you can then enter "=A1" in cell D2.
hth
Rob
Rob Brockett
Kiwi in the UK
Always learning & the best way to learn is to experience...
So you want to have A1 updated automatically but not D2?
How about leaving cell A1 as "=today()" & then manually typing (or using the shortcut combination) today's date into cell D2?
It may help us if you explain more about the file, for example:
- is it a template file?
- what is the logic which explains how the necessary date for cell D2 is identified?
Rob
OceanBlue,
Your choice of large bold text does not encourage me (& possibly others?) to attempt to help.
I will try & explain my difficulties with your question one more time and perhaps you may understand my perspective...
If there is "no specific logic" how does the file know when you open it, that the day the file is opened (eg "today"), is actually the "Today()" that you want the formula to state as the date. If you can't define specific logic, then how is the file meant to know that tomorrow is a different day when you open it tomorrow?
(correspondingly, how can we provide a formula/macro which needs to be based on logic?)
----------
When you say "the file is a Template" for yourself, do you mean that the file is actually saved as an ".xlt" file (see Excel Help files for more details)?
Or is it just an ".xls" file that you copy, and save with a new name each day?
re "thought it can be done":
- I'm confused...
Can you please explain what is incorrect about my previous suggestion when compared against your response to Day92's question in post ?
- With a clear explanation it is very very likely that something this easy can be done in excel, although it may require a macro.
- However, just because it can be done, doesn't mean it should be done. Do you use Microsoft Outlook?
MS Outlook has a number of options for recording date related actions such as the Journal or the Calendar via Appointments, Tasks, Reminders etc. Have you considered recording your daily Tasks in Outlook?
hth
Rob
My Apology for the Bold text.
And I appreciate your help.
Last edited by romperstomper; 05-11-2011 at 01:32 AM. Reason: Remove unnecessary quote
Put his into the codemodule of 'Thisworkbook'.
I assume that his file will be closed every day at least once.![]()
Please Login or Register to view this content.
hi guys,
OceanBlue,
Apology accepted. If Snb's suggestion doesn't help, can you please answer my post # 11 questions?
Note that Snb's code:
- may mean that you always get a popup asking "do you want to save changes?"
- populates a cell on every sheet in the file.
- requires "macros to be enabled".
Snb,
Thanks for popping by :-)
Rob
Have you considered recording your daily Tasks in Outlook? Excel is a better choice, as I can enter all my tasks in one sheet, and a column to set the percentage accomplished. I copy this sheet to the end with tomorrows date on it.
This is where I needed to read today's date, but would not change the next date.
So I concluded that a simple click of " Ctrl ; " would do the trick.
Much appreciated.
Oceans Blue
Hi OceanBlue,
Thank you for the final response, marking the post as Solved and for adding to my rep' :-)
btw, When quoting posts, it is best to delete any text that doesn't specifically relate to the phrase or sentence that you want to comment on. This minimises clutter in the thread & therefore makes it easier to read (see Rule # 12).
Rob
hi OceanBlue,
In response to your pm...
Oh, am I correct in assuming you are very new to "macros"?Originally Posted by OceanBlue
If so, I suggest you read the below link before going any further:
http://dmcritchie.mvps.org/excel/getstarted.htm
All done, read & now a little more knowledgeable?
Rightio...
To use Snb's code from post # 13:
- press [alt + F11] in excel to open the VBE.
- press [ctrl + r] to ensure that the Project Explorer pane is visible
- choose the "VBAProject..." that states the desired file name.
- expand the sub folder called "Microsoft Excel Objects"
- double click on the "ThisWorkbook" module (as per Snb's post)
- paste the below modification to Snb's original code into the "code pane" which probably appeared on the right of the screen when you double-clicked.
Note:![]()
Please Login or Register to view this content.
The main change I have made to Snb's code is to change "For Each sh In Sheets" to "For Each sh In Worksheets" to prevent the code trying to update a cell value on any chart sheets that you may have in the file.
- I hope I haven't missed any steps!
Goodluck
hth
Rob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks