Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-20-2024, 01:32 AM
Jamal NUMAN Jamal NUMAN is offline Windows 7 64bit Office 2010 64bit
Expert
 
Join Date: Nov 2010
Posts: 615
Jamal NUMAN is on a distinguished road
Question Office 2021: How to use the “Find and Replace” tool to replace searched words with other words with


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".
Attached Images
File Type: jpg Clip_1247.jpg (199.6 KB, 24 views)
Reply With Quote
  #2  
Old 08-20-2024, 03:45 AM
Robert2 Robert2 is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Jun 2013
Posts: 175
Robert2 will become famous soon enoughRobert2 will become famous soon enough
Default

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.
Reply With Quote
  #3  
Old 08-20-2024, 10:29 AM
Jamal NUMAN Jamal NUMAN is offline Windows 7 64bit Office 2010 64bit
Expert
 
Join Date: Nov 2010
Posts: 615
Jamal NUMAN is on a distinguished road
Question

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?
Attached Images
File Type: jpg Clip_1248.jpg (153.3 KB, 19 views)
File Type: jpg Clip_1249.jpg (154.7 KB, 19 views)
File Type: jpg Clip_1250.jpg (162.9 KB, 19 views)
File Type: jpg Clip_1251.jpg (160.7 KB, 19 views)
File Type: jpg Clip_1252.jpg (160.9 KB, 19 views)
Reply With Quote
  #4  
Old 08-20-2024, 12:18 PM
Robert2 Robert2 is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Jun 2013
Posts: 175
Robert2 will become famous soon enoughRobert2 will become famous soon enough
Default

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.
Reply With Quote
  #5  
Old 08-20-2024, 04:02 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #6  
Old 08-20-2024, 08:14 PM
Robert2 Robert2 is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Jun 2013
Posts: 175
Robert2 will become famous soon enoughRobert2 will become famous soon enough
Default

Quote:
Originally Posted by Guessed View Post
I would copy a properly formatted 'R²' to the clipboard and then use ^c in the Replace With field.
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”…
Reply With Quote
  #7  
Old 08-20-2024, 10:36 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #8  
Old 08-20-2024, 11:13 PM
Robert2 Robert2 is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Jun 2013
Posts: 175
Robert2 will become famous soon enoughRobert2 will become famous soon enough
Default

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”.
Reply With Quote
Reply



Similar Threads
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
Find and replace words according to excel file laith93 Word VBA 7 12-13-2021 08:11 PM
Find & Replace Multiple words Gartholameau Word VBA 2 01-20-2019 04:56 PM
multiple find and replace in vba for special words kvnrao Word VBA 7 11-02-2018 06:28 PM
Find and replace mutiple spaces between lowercase words only Dave T Word VBA 2 07-16-2015 11:23 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft