Forum Discussion
Excel Autocorrect Formatting
- May 07, 2022
This doesn't exist in Excel since, unlike Word, text processing is not its primary purpose.
You might use VBA code. In the attached workbook, Sheet1 will replace some abbreviations and italicize the replacement matching the entire cell. Sheet2 will do the same for part of the cell.
You'll have to allow macros.
The code is in the worksheet modules - right-click a sheet tab and select View Code from the context menu to see and edit it.
I can't upload anything really, confidential stuff. But it really is a very simple chart that I'm using as a board for a presentation. Participants will ask me to fill in the chart with various phrases, such as CALIFORNIA DREAMING or something similar. So I've created autocorrect shorthands such as CAL so I can better keep up with what they are saying. For some of the phrases, I want them to appear on the board in italics automatically.
In Word, you can easily just select the word in italics and create a shorthand for that, but the same functionality doesn't exist in Excel.
- HansVogelaarMay 07, 2022MVP
This doesn't exist in Excel since, unlike Word, text processing is not its primary purpose.
You might use VBA code. In the attached workbook, Sheet1 will replace some abbreviations and italicize the replacement matching the entire cell. Sheet2 will do the same for part of the cell.
You'll have to allow macros.
The code is in the worksheet modules - right-click a sheet tab and select View Code from the context menu to see and edit it.
- Ryan_HoltzMay 08, 2022Copper ContributorThis is exactly what I was looking for! Thank you so much.
Apologies for being so code-illiterate, but is there also a way to have certain words be changed to not be italics? So basically run two VBA codes at the same time, one that changes it to italics, and one that changes it from italics to no italics?- HansVogelaarMay 08, 2022MVP
The current code runs automatically when you enter something in a cell.
Removing Italics seems to be more suitable for a macro to be run separately. Or do you disagree?