![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]() Office 2021: How to use the “Find and Replace” tool to replace searched words with other words with superscripts? For example, in the screenshot below, I need to find "R2" and replace it with "R²" (where the "2" is superscript). The “Replace with” box does not appear to have tools to enable typing "R" with a superscript "2". |
#2
|
|||
|
|||
![]()
Type "R" in the "Replace With" box of he “Find and Replace” tool, then type "00B2" followed immediately by "Alt+X". "00B2" will automatically be replaced with "²".
Alternatively, you can type "R²" in the document window, select it, then press Ctrl+C to copy it to the clipboard. You can then paste the clipboard contents into the "Replace With" box of he “Find and Replace” tool. |
#3
|
|||
|
|||
![]()
Thank you for your help. The first method works fine, but I had no luck with the second one, which seems more intuitive based on the screenshots below. What could be wrong with the second method?
|
#4
|
|||
|
|||
![]()
You need to copy "R²" from the document window. But the “²” in the "R²" string must be Unicode U+00B2. To check this, place the insertion cursor right after the “²” character, then press Alt+X. You should get “00B2”.
To get a proper “²” in the "R²" string, type “R” followed by “00B2”, then Alt+X. If you type ordinary “2”, select it, then superscript it, you don’t get U+00B2. You get “0032”, which is Unicode for an ordinary space character. Maybe this is a bug in Word. |
#5
|
||||
|
||||
![]()
I would copy a properly formatted 'R²' to the clipboard and then use ^c in the Replace With field.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#6
|
|||
|
|||
![]()
Pasting with “Ctrl+V” might be easier than typing “^c”… The problem is to copy a properly formatted “R²”… And to realize that the document “R²” might not be “properly formatted”…
|
#7
|
||||
|
||||
![]()
Robert2
Your suggestion of actually pasting the formatted clipboard contents into the Replace with field removes the formatting that the OP was looking for. Using ^c allows the replace to preserve that formatting. Looking at the OP's initial post and screen capture shows that there was an example that was already 'properly formatted'.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#8
|
|||
|
|||
![]()
Maybe, but what exactly is “preserved”?
The OP’s screen capture shows nothing. It could be a “2” superscripted through the Font dialog. It could be a proper Unicode character with code “U+00B2”. If I copy a “2” superscripted through the Font dialog, use “^c” in the Replace With box, then press Alt+X to reveal the code of the replaced superscripted “2” in the document window, I get “0032”. On the other hand, if I copy a proper Unicode “SUPERSCRIPT TWO” character, use it in the Replace With box, the character that gets replaced (pasted) in the document window actually is Unicode “00B2”. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Words failing to be replaced on find and replace. | Obango Benjamin | Word | 1 | 06-14-2022 05:50 PM |
![]() |
laith93 | Word VBA | 7 | 12-13-2021 08:11 PM |
![]() |
Gartholameau | Word VBA | 2 | 01-20-2019 04:56 PM |
![]() |
kvnrao | Word VBA | 7 | 11-02-2018 06:28 PM |
![]() |
Dave T | Word VBA | 2 | 07-16-2015 11:23 PM |