excel function that stores the current date and does not update - excel

I have used the excel function Now() to enter the current date. The problem is every time I open the excel workbook it changes the cell to the current date. I need it to remain the date I entered it in. I have also tried function Today() and it does the same thing.

Related

How to get particular activity within the range on specific date and time in custom excel calendar

I am using an excel sheet which I have design looks like an excel calendar. The Outlook of this sheet is as under.
The 1 is representing the Time which I am getting from system using =time() function, while the No.2 is the date which I am getting from system using today(). I have written the formula using if for range C4:D21 which is working good. The formula is as under.
=IF(AND($C$3=K8,B4=K7),C4,IF(AND($C$3=K8,B5=K7),C5,IF(AND($C$3=K8,B6=K7),C6,IF(AND($C$3=K8,B7=K7),C7,IF(AND($C$3=K8,B8=K7),C8,IF(AND($C$3=K8,B9=K7),C9,IF(AND($C$3=K8,B10=K7),C10,IF(AND($C$3=K8,B11=K7),C11,IF(AND($C$3=K8,B12=K7),C12,IF(AND($C$3=K8,B13=K7),C13,IF(AND($C$3=K8,B14=K7),C14,IF(AND($C$3=K8,B15=K7),C15,IF(AND($C$3=K8,B16=K7),C16,IF(AND($C$3=K8,B17=K7),C17,IF(AND($C$3=K8,B18=K7),C18,IF(AND($C$3=K8,B19=K7),C19,IF(AND($C$3=K8,B20=K7),C20,IF(AND($C$3=K8,B21=K7),C21,IF(AND($D$3=K8,B4=K7),D4,IF(AND($D$3=K8,B5=K7),D5,IF(AND($D$3=K8,B6=K7),D6,IF(AND($D$3=K8,B7=K7),D7,IF(AND($D$3=K8,B8=K7),D8,IF(AND($D$3=K8,B9=K7),D9,IF(AND($D$3=K8,B10=K7),D10,IF(AND($D$3=K8,B11=K7),D11,IF(AND($D$3=K8,B12=K7),D12,IF(AND($D$3=K8,B13=K7),D13,IF(AND($D$3=K8,B14=K7),D14,IF(AND($D$3=K8,B15=K7),D15,IF(AND($D$3=K8,B16=K7),D16,IF(AND($D$3=K8,B17=K7),D17,IF(AND($D$3=K8,B18=K7),D18,IF(AND($D$3=K8,B19=K7),D19,IF(AND($D$3=K8,B20=K7),D20,IF(AND($D$3=K8,B21=K7),D21))))))))))))))))))))))))))))))))))))
This is a too long function which is only working for two columns I want to know the formula which will match the running time and date within the row date C3:I3 and time B4:B21 and then populate only concerned cell value within the K4 Cell where "False" is written. This formula is working good but I want to a shorter one. Thanks
Try below formula.
=INDEX(C4:G11,XMATCH(K7,B4:B11,-1,1),MATCH(K8,C3:G3,0))
Here XMATCH() parameter [match_mode] -1 means search next smaller time if time is not exactly same as Column B.

How to make a date column in a table that automatically fills itself out when a new item is added to the table?

E.g.
like this
When I enter a new row the previous dates should not update.
How are you writing in the dates in the first place?
Enter the date into the new rows as a value. Don't use the TODAY() function as this will always change to the date as of opening the worksheet.

Inserting a fixed date within a condition in Excel

I want to create a condition that, if it exists, its execution date will be preserved
For example, if the number 10 appears in a cell today, I want the today's date (17/5/17) to be stored in the cell next to it, and tomorrow the today's date (17/5/17) will appear in the cell.
So I tried to use functions like TODAY or DATE, but if i use them - then tomorrow the date in the cell will change to tomorrow's date.
How can I keep the first date of the condition?
You can't. At least not with formulas. A formula using Today() will always recalculate to deliver today's date. That's the purpose of the Today() function.
For a static time stamp, you will need to engage VBA to capture today's date and write it as a hard coded (or constant) value, so that it will not be updated when the sheet is recalculated.
You may want to research topics like "Excel date stamp" or "Excel time stamp" for VBA code examples that use that approach.
You still use the function TODAY... but you will need to write a Workbook_Open subroutine (which will automatically run once every time the workbook is open) to change the formula to actual date value...
You can switch off the automatic update in the calculation options of formula so that it only updates when you press F9. But this means that if the value of your reference cell changes then today's date will not be modified, even if you want it to.

Date functions in Excel VBA only return 12/30/1899

In Excel VBA, i'm trying to read a date from a cell. The cell contains the date in the form "dd.mm.yyyy" (I'm in Germany). What I need specifically is the month. But when trying to read the month, Excel returns "12" every time. By trying Day() and Year(), I found out that the cell is recognised as blank cell and thus only returns the date of 12/30/1899, when obviously the date is entered correctly.
So this is what I'm trying to do which doesn't work (to put it as simply as possible):
ActiveSheet.Range("K2") = Month(B2)
And there you go, I get a "12" in K2, when the date is actually 02.02.2016.
You need to understand that Excel stores dates as numbers, which are formatted to appear like dates in the current locale. The earliest date Excel can show is 1/1/1900, which is the number 1 in General format.
The date 15-July-2016 is the number 42566. That is the number of days since 1/1/1900.
To establish if a cell contains a real date, try formatting it with a different number format. Once you've established that it is a number and can be formatted as a date, you can move on to the next troubleshooting step.
You're not referencing cell B2 correctly. Try
ActiveSheet.Range("K2") = Month(ActiveSheet.Range("B2"))

Excel track changes by adding timestamp Not Working

Please Check and see the sample screenshot.
When I update I1 Coll value, it should be update in H1 Coll time stamp But it is updating all the timestamps of H Coll.please see the Formula also.
H Col Formula is:
=IF(I1<>"",IF(J1="",Now(),J1),"")
My Doubt is when I use NOW(), it is automatically updating all the timestamps in Excel.
In Excel, all volatile functions update automatically whenever any cell refreshes. Now() is a volatile function. So any value you have already calculated with your formula that displays "NOW()" will update any time you enter data in a cell.
To get arround this you will either need to use a macro with VBA, or manually copy & paste values whenever you want to 'hardcode' the timestamp.

Resources