Excel 2013 How to assign dates to cells - excel

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.

Related

Excel date conversion to day of the week: not working after 1 row

I want to get days of the month corresponding to each particular dates in a column in Excel (Note that I am using the web version of office Excel).
The formula =TEXT(A2,"dddd") works correctly for the first row and then when applied to the later rows does not perform as needed. It returns the same date and not the weekday. I have checked the format of the cells, and it is all sent to General.
See the attached image for reference, the formula worked in C2, and not after that.
Note: I have inserted a table for the required range.
Not Recognizing d/m/yyyy
For cell A2 you can use this formula instead (in cell C2):
d/m/yyyy (Your Case)
=TEXT(DATE(VALUE(RIGHT(A2,LEN(A2)-FIND("/",A2,4))),VALUE(MID(A2,FIND("/",A2)+1,FIND("/",A2,4)-FIND("/",A2)-1)),VALUE(LEFT(A2,FIND("/",A2)-1))),"dddd")
m/d/yyyy (Someone else might need this.)
=TEXT(DATE(VALUE(RIGHT(A2,LEN(A2)-FIND("/",A2,4))),VALUE(LEFT(A2,FIND("/",A2)-1)),VALUE(MID(A2,FIND("/",A2)+1,FIND("/",A2,4)-FIND("/",A2)-1))),"dddd")

How to check date format in Excel

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.

How can I copy row values based on the value of one of the cells in that row?

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)

Excel date query

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.

Excel highlight the cell of the matched date

I just want to know if it is possible for a a certain cell to be highlighted based on date whenever I put notes into another cell? As you can see at the image below, there are set of calendar with dates.
Now what I want to achieve is to highlight those dates whenever I put notes into another cell as the image shown below
Let's say I input a note in 5-Jan, Saturday the cell in image 1 ( January 5 ) will be highlighted with background color
Your problem consists of two parts. First you need to know how to use conditional formatting based on a formula, then you need to map your calendar cells to the corresponding notes cells.
Conditional formatting based on a formula is documented on several places on the web, for example here. For your case, I have created a screenshot of a simple example:
The difficult part (or hard labour, depending on which route you choose) in your case is to map all cells in your calendar to the corresponding cells potentially containing the note. So you need a way to calculate which day in the year a particular cell is.
I think you could achieve that via 12 different conditional formatting formulas, where you refer to the contents of "this" cell using INDIRECT("RC",FALSE) to get the day of the month, and then add the number of days before that month (for which you need 11 different constants). That result can be used as the index into your array of potential notes. So for February, the formula to calculate the day of the year becomes:
31+INDIRECT("RC",FALSE)
Using that number to check the row in your notes column (let's say they are in column A), the conditional formula for all cells in February becomes
=NOT(ISBLANK(INDIRECT("A"&(31+INDIRECT("RC",FALSE)))))
Then do the same thing for each month, where the constant (like 31) is different for each of them.
Note that using "RC" in INDIRECT() like this only makes sense in a conditional formatting formula.

Resources