ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   AUTO CORRECT PROBLEM (https://www.excelbanter.com/excel-discussion-misc-queries/194019-auto-correct-problem.html)

Chris

AUTO CORRECT PROBLEM
 
I am working in Excel 03. I am constructing a large database whereby in
certain cells when an individual enters A, E or P it is auto corrected to a
numeric value. To my horror these auto corrections have carried on in Word,
Outlook and PowerPoint. How do I restrict these autocorrects to just the
spreadsheet I am working on?

Bob I

AUTO CORRECT PROBLEM
 
As you have observed the AutoCorrect is a Suite wide file. At the least
you would do a find and replace or use a macro to do this.

Chris wrote:

I am working in Excel 03. I am constructing a large database whereby in
certain cells when an individual enters A, E or P it is auto corrected to a
numeric value. To my horror these auto corrections have carried on in Word,
Outlook and PowerPoint. How do I restrict these autocorrects to just the
spreadsheet I am working on?



Gord Dibben

AUTO CORRECT PROBLEM
 
Chris

You can use a helper cell to return a number based upon a lookup table with
letters and numbers.

Or you could use event code to change the letters to numbers as you enter them.

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A1:A20") 'adjust range to suit
If Intersect(Target, r) Is Nothing Then
Exit Sub
End If
vals = Array("A", "E", "P") 'add more if needed
nums = Array(8, 9, 6) 'add more if needed
For Each rr In r
ivalue = 0
For i = LBound(vals) To UBound(vals)
If UCase(rr.Value) = vals(i) Then
ivalue = nums(i)
End If
Next
If ivalue 0 Then
rr.Value = ivalue
End If
Next
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the code into that module. Edit to suit then Alt + q to return to
the Excel window.


Gord Dibben MS Excel MVP

On Tue, 8 Jul 2008 03:23:01 -0700, Chris
wrote:

I am working in Excel 03. I am constructing a large database whereby in
certain cells when an individual enters A, E or P it is auto corrected to a
numeric value. To my horror these auto corrections have carried on in Word,
Outlook and PowerPoint. How do I restrict these autocorrects to just the
spreadsheet I am working on?




All times are GMT +1. The time now is 08:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com