Stop auto correction of number into a date

Anonymous
2010-04-09T11:08:55+00:00

When i work with excel, i do data entry, some of the numbers that i type in can be interpenetrated  as dates. when this happens excel automatically changes the format of the cell from general, to date. i want to be able to stop this auto correction.

I know there are a number of ways to avoid this happening, but i am fed up with these methods. i simply what to turn the auto correct off, so that instead of what i type into the cell changing, what i type into the cell shows exactly what i typed in.

really hope there is someone out the who knows how to do this.

thanks

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-04-09T17:09:58+00:00

If you format the cells as Text, all entries will be entered as text

(leading zeroes will be retain, date-like values won't be converted to dates, etc)

...CTRL+1 (to view the formatting dialog window)

...Select: Number_tab...Category: Text

That should resolve most (but not all) of the problem.

Does that work for you?


Ron Coderre

Microsoft MVP - Excel (2006 - 2010)

P.S. If any post answers your question, please mark it as the Answer (so it won't keep showing as an open item.)

Was this answer helpful?

60+ people found this answer helpful.
0 comments No comments
Answer accepted by question author
Anonymous
2010-04-09T16:55:47+00:00

Tim

I understand your frustration but this is not an autocorrect issue. 

Typing in 1/5 will automatically be recognised as a date as that is what it is unless... you signify that it is a formula and you expect the answer 0.2 to appear or it is a text item in which case you must preceed the data with a ' apostrophy.

In signifying the that the item is text you will have a data item which is left aligned, as all text is by default.  All other items in this column (even if purely numeric such as product codes) should aligned left.  Product codes though numeric should never be treaded like numbers, if you do, then expect issues.  Telephone numbers are similarly not true numbers, if they were treated as such, leading zeros would be dropped.

Though the whole idea of having to type in that extra character of ' is a pain to remember, it will make your data more acurate, reliable and portable.


Pat PS If you found this useful please vote. Thank you:¬)

Was this answer helpful?

40+ people found this answer helpful.
0 comments No comments

311 additional answers

Sort by: Oldest
  1. Anonymous
    2012-08-19T22:46:54+00:00

    This works for Excel 2010 , I think it will work with 2007

    Using the data from the web query

    ALT then A, R, O ........................ (Data -> Refresh All Drop down -> Connection Properties)

    ALT+D ...................................... (Definition Tab)

    ALT +E ...................................... (Edit Query)

    ALT +O ..................................... (Options)

    ALT +D ...................................... (Disable date recognition)

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-08-19T22:47:59+00:00

    There may be greater ones, but it appears these minds think a like! :)

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-08-21T06:50:04+00:00

    The topic of discussion is really a MS heavy blunder that annoys for decade. However, even if we live to new Excel versions with automatic reformatting made facultative, some of us will still have to work with preceding versions, which behave the present way. The solutions here mentioned for xl 2007 or higher, are probably inapplicable in older versions.

    For some time, I was using a simple macro to correct the results of web queries, at least post fest. The present thread has provoked me to accomplish it with further amendments.

    Following macros revert in fact the MS algorithms. The problem is that all formats like 1.12 or 1-12 are reformatted into the same shape of Jan-12 or 12.1, according to national setting, regardless of the original form. The back route thus has to be differentiated according the target, by choosing appropriate macro, here WrongDates2General or WrongDates2Scores (even fractions can be recreated to some extent by such a sort of macro). This implies also proper pre-selection of the different ranges to be re-transformed before running the macro (some real dates can even be originally ok and thus avoided).

    The detection of the way the formats should be changed in, is derived from formats like “mmm-yy”, “yy-mmm”, “d-mmm” or “mmm-d”, xl automatically applies according to national settings. If these had been user changed, the cases of formats in Case rows in the script must be adapted.

    The simultaneous function rendered by WrongDates2General macro, is the conversion of transferred numerals from the point to the comma style, including wrongly date-formatted, and vice versa, according to the automatically recognized national setting.

    Tested with win7, xl 2003.

    Regards

    Petr Bezucha

    Option Explicit

    Sub FalseDate2Number()

    Dim Cell As Range, DC As Variant, DS(0 To 1) As String, I As Long

    DS(0) = "."

    DS(1) = ","

    I = Application.International(xlDecimalSeparator) = "."

    For Each Cell In Selection

      DC = Cell.Value

      If VarType(Cell) = vbDate Then

        Select Case Cell.NumberFormat

        Case "d-mmm", "mmm-d"

          Cell.Value = CDbl(Day(DC) + Month(DC) / 10 ^ Len(CStr(Month(DC))))

        Case "mmm-yy", "yy-mmm"

          Cell.Value = CDbl(Month(DC) + 0.01 * CLng(Right(CStr(Year(DC)), 2)))

        End Select

      Else

        If IsNumeric(Replace(DC, DS(-I), DS(1 + I))) Then _

          Cell.Value = CDbl(Replace(DC, DS(-I), DS(1 + I)))

      End If

      Cell.NumberFormat = "General"

    Next Cell

    End Sub

    Sub FalseDate2Score()

    Dim Cell As Range, DC As Variant, DS(0 To 1) As String, I As Long, _

      A1 As String, A2 As String

    Const Divider As String = "-" 

    DS(0) = "."

    DS(1) = ","

    I = Application.International(xlDecimalSeparator) = "."

    For Each Cell In Selection

      DC = Cell.Value

      If VarType(Cell) = vbDate Then

        Select Case Cell.NumberFormat

        Case "d-mmm", "mmm-d"

          A1 = CStr(Day(DC)): A2 = CStr(Month(DC))

        Case "mmm-yy", "yy-mmm"

          A1 = CStr(Month(DC)): A2 = Right(CStr(Year(DC)), 2)

        End Select

        Cell.NumberFormat = "@"

        Cell.Value = A1 & Divider & A2

      End If

    Next Cell

    End Sub

    Was this answer helpful?

    0 comments No comments