I have a cell at the top of the spreadsheet that contains the date (say Feb 2013). I want to create columns off of that "reference" cell. In other words, based off of that date, I want one of the columns to display. But when I attempt, this it simply does not auto-increment the date but displays some random date.
02/01/2013
02/02/2013
02/03/2013
..
..
02/28/2013
As far as excel is concerned, a date in excel is just a number incremented from some arbitrary day in the past. For example, type 2/5/2013 into any cell. Excel will automatically format this cell as a date. Now right click, and format the cell. Under the number tab, select general and you will see excel really has the date stored as 41310. Using this same principle, if you want to increment dates based off of a reference date, it can be done simply by =A1+1 assuming the reference date is in cell A1. For example, type 2/1/2013 in cell A1 and in column B type =A1+1. Now drag this cell down as far as you want. As long as column B is formatted as a date, it will increment day by day.
Related
How to add 8 hours to existing cell
the cell content is "2020-02-14 09:41:52"
Lets say my column is in A1
I've tried
=(A1)+8
But I'm getting #VALUE!
If you are sure that your cell is formatted correctly as date time, then adding integers to date time values in Excel adds to the days. Trying =A1+8/24 should do the trick.
I need to auto populate any two cells in Excel with the 16th of the previous month and the 15th of the current month based on the system date.
Example: Current month is January based on the system date.
So cell "A1" and "A2" need to be populated with 16-DEC-2018 and 15-JAN-2019.
You can just use excel formulas like Scott suggested. There's no reason to do this with VBA.
Give cell A1 the formula: =DATE(YEAR(TODAY()),MONTH(TODAY())-1,16)
Give cell A2 the formula: =DATE(YEAR(TODAY()),MONTH(TODAY()),15)
If you need the dates in that specific format, set the cells to have a custom format of dd-mmm-yyyy
I'd like to assign dates to cells in a planner spreadsheet I have made.
Currently, the rows are months, the columns are days of the week, and each individual cells just have a number for the day of the month.
I don't want to display the full date in the cell, just have the cell "know" what date it is representing. One use of this could be to have the current day always highlighted in a different colour when opening the spreadsheet. Is this possible in Excel?
Looking at your question, the results would require to show multiple "dates" within the cell.
For January '16 for example, you would have 4 different type of dates as January has 4 Mondays (4;11;18;25). Is this what you're looking to achieve? Otherwise it is not possible to have excel figure out a single date unless you provide it with additional references in order to come up with a result.
Enter a date into a cell. Format the cell to show the part of the date you want to see. In the screenshot, column A contains full dates in each cell. A2 and down are formatted with the custom format code shown in column C
Excel still treats the dates as the underlying full dates in formulas, even though only parts of the dates are showing in the cell.
I have around 20,000 records in an Excel file and around four columns which have dates. I am trying to insert those into SQL. However date columns have dates in incorrect format eg; 02/092015 or 02/90/2015 or 2015. So checking 20,000 records one by one would be very lengthy.
I tried to count / but it didn't work. It changes the format of column to date.
I was looking for some formula which can check the format and maybe color the cell or something like it.
I was running across this issue today, and would like to add on to what nekomatic started.
Before we begin, the TEXT formula needs to follow the date format we are working with. If your dates are in month/day/year format, then your second argument for the TEXT formula would be "mm/dd/yyyy". If it is in the format day/month/year, then the formula would need to use "dd/mm/yyyy". For the purposes of my answer here, I am going to have my dates in month/day/year format.
Now, let's assume that cell A1 contains the value 12/1/2015, cell A2 contains the value monkey, and cell A3 contains the value 2015. Further, let's assume our minimum acceptable date is December 1st, 2000.
In column B, we will enter the formula
=IF(ISERROR(DATEVALUE(TEXT(A1,"mm/dd/yyyy"))),"not a date",IF(A1 >=DATEVALUE(TEXT("01/01/2000","mm/dd/yyyy")),A1,"not a valid date"))
The above formula will validate correct dates, test against non-date values, incomplete dates, and date values outside of an acceptable minimal value.
Our results in column B should then show 12/1/2015, not a date, and not a valid date.
Two of the examples you give are text which may be identified with Conditional Formatting by applying a formula rule such as:
=ISTEXT(A1)
and colouring the result as you wish. There would be an issue if all your dates (even those of valid format) are also text but I'm guessing that is not the case.
For the third example (ie 2015) a CF formula rule such as:
=AND(A1<2500,A1>0)
may help.
If your columns are a mixture of what should be dates and other entries that are properly text strings your approach may be better than the more general ISTEXT, for example a CF formula rule of:
=FIND("/",A1)>0
If you can add a column to the Excel sheet with the formula
=DATEVALUE(TEXT(A1,"dd/mm/yyyy"))
this should return #VALUE if the contents of A1 are not a valid date in dd/mm/yyyy format. You can filter on this value to identify the incorrect records.
Edit: If A1 contains only 2015 this formula returns 07/07/1905 (if the formula cell is formatted as date) so you can spot these by filtering for dates before the earliest correct date your file should contain.
Column A consists of a series of dates extending from today into the future.
Columns B-E are other values corresponding to those dates.
Initially the first three rows were blank. Then I used the function TODAY() to obtain today's date and put that in cell A1. Today's date matches a value in cell A91. I now want the values in B1-E1 to match the values in B91-E91.
How can I go about doing that? It needs to be done with reference to cell A1 because I want it to update whenever the spreadsheet is opened. Thus I can't just type =B91 in B1.
Here's what it looks like
I am working in Google Spreadsheets but I suspect an answer related to Microsoft Excel would probably work here too.
The VLOOKUP function works, for example
=VLOOKUP(A1,$A$3:$E$1000,2,FALSE)