Reputation: 51
My column values are as follows:
1-1
1-2
2-1
2-2
...
12-1
12-2
13-1
13-2
...
n-1
n-2
On cells containing 1-1 up to 12-2, excel doesn't meddle with me, but starting on 13-1 up to the nth row, it shows warning "Text date with 2-digit year". Unfortunately, this are really not dates. Also, I already tried formatting the said rows/cells as text before inputting any values, but really when excel sees "13-1" and above, it shows the error. How should I fix this?
Additional info: when the rows are shown using formula, there are no errors, but sadly, using formula is not an option and I need values as is.
Upvotes: 3
Views: 2166
Reputation: 698
Stop excel from converting copy-pasted number/text values to date
Upvotes: 1
Reputation: 589
If you add a single quote to the start of the dates Excel treats it as a string. Works for numbers as text too
Upvotes: 1
Reputation: 152
You can type ="1-1" instead of just 1-1 When you type 1-1, excel change this to 1-Jan. When you type ="1-1" , Excel treat the value as string. Hope it helps.
Upvotes: 5
Reputation:
Turn off error checks for those types of errors.
With Application.ErrorCheckingOptions
.TextDate = False
.NumberAsText = False
End With
Also found within File, Options, Formulas, Error checking rules.
Upvotes: 0
Reputation: 759
Just right click on the column click on Format Cells ... on Number Tab on Category List select Text, this will make anything you enter or have as a text.
But if you are copy paste data then use Match Destination Format (M), just right click on the cell and select Match Destination Format (M) not Ctrl-V.
Upvotes: 3