Forum Discussion
TES10
Apr 11, 2019Copper Contributor
Change date formula
Hi I am trying to make a VLOOKUP on dates, but no matter what I do, and how I format, the funktion in one og the sheets is wrong (see attachment). How do I change the formula line into YYYY-MM-DD? ...
TES10
Apr 11, 2019Copper Contributor
My problem is, that they look differently in the two sheets, and that makes the VLOOKUP impossible.
I have tried to attach the sheet
The formula looks lige this =LOPSLAG(A2;'Ark1'!$A$2:$B$637;2;FALSK)
SergeiBaklan
Apr 11, 2019Diamond Contributor
TES10 , your dates in column A are actually texts. Even if you apply date format to that column it doesn't convert texts to dates. You may use DATEVALUE in your formula as
=VLOOKUP(DATEVALUE(A2),'Ark1'!$A$2:$B$637,2,FALSE)
if your default date format is YYYY-MM-DD, or better transform entire column A to dates using Data->Text to Columns and on third step of the wizard selecting
See Sheet 2 in attached with such conversion.
- TES10Apr 11, 2019Copper Contributor
- SergeiBaklanApr 11, 2019Diamond Contributor
TES10 , first they are aligned left what is default for texts. More reliable is to check with ISTEXT or ISNUMBER