Dates in Excel
In the example, I've put a formula (=INT(NOW()*1000000) in B2 so that each time the spreadsheet is saved, it has a unique name. The =now() function returns the current date and time, but it's useful to remember that dates are stored internally as the number of days since 1/1/1900 - this means, for example, that you can go back or forward a week by simply subtracting 7 from, or adding 7 to a date. You could also work out what day of the week a given date is on by subtracting a date with a known weekday, and using the =mod() function (e.g. 20/10/2002 is a Sunday, so if 20/10/2002 was in A1, =mod(now()-A1,7) would give you the day of the week as a number – you could then use =vlookup() to give it a name).
Dostları ilə paylaş: |