10/14/2019 Word Shortcut For Highlighting Text Mac
My husband wanted to select a long column of text and find any text that was inside square brackets and reformat it so that the text — and the square brackets — was 4 pt and blue (no, I don’t know why either). This is an ideal job for using wildcards in Word’s find and replace. However, square brackets are special characters in wildcard searches, so they have to be treated differently. With some help from and a bit of trial and error, I figured it out. I explain what all the settings mean after these steps, if you’re interested. Meantime, here’s my solution, which works in all versions of Word:.
Select the text you want to change (e.g. Entire document, selected paragraphs, selected columns or rows of a table). Press Ctrl+H to open the Find and Replace dialog box. Click the More button.
Select the Use wildcards check box. Put your cursor into the Find what field.
Type the following exactly (or copy it from here): ( )(.)( ). Go to the Replace with field and type: 1 2 3. Click the Format button, and select Font. On the Font dialog box change the settings to what you want — in my husband’s case, this was 4 pt and blue — then click OK. Your Find and Replace dialog box should now look like this. Find and reformat text inside square brackets.
Jul 24, 2009 - Ctrl+Shift+Left/Right arrow: Select text by whole words. (Alt+Shift+Left/Right arrow on Mac) Ctrl+Home: Move cursor to top of the text field (Cmd+Up Arrow on Mac). Feb 23, 2009 - Adding highlighting: Select the text you want to highlight, then press Ctrl+Alt+H. Posted in Word| Tagged keyboard shortcuts|.
Click Replace All. Once all replacements have been made, check that you got what you expected before making further changes to the document. If it’s all OK, save your document with the new changes. What it all means The three elements of the Find are:.
( ) — You need to find a specific character (the opening square bracket), so you need to enclose it in parentheses. However, because the square brackets are special wildcard characters in their own right, you need to tell Word to treat them as normal text characters and not as special characters, so you put in a backslash ‘ ‘ (also known as an ‘escape’ character) before the. (.) — This tells Word to look for any characters after the opening square bracket. There’s no limit on what sort of characters (alpha, numeric, or symbols) Word is to find, or on how many there are. ( ) — This tells Word to stop the find at the first closing square bracket it finds after an opening square bracket followed by any other characters.
As with the opening square bracket (1. Above), the closing square bracket is a special wildcard character, so needs a backslash in front of it for Word to treat it as ordinary text, and it needs to be enclosed in parentheses as it’s an exact match you want.
There are no spaces between any of these elements — the aim is to find a string such as green frog and replace it with exactly the same text but formatted in a different color and with a difference font size. The three elements of the Replace are:. 1 — Tells Word to replace the first element of the Find with what was in the Find (the opening square bracket). 2 — Tells Word to replace the second element of the Find with the same text as what was found. In other words, keep the exact text as was found, but change it’s font size and color.
3 — Tells Word to replace the third element of the Find with what was in the Find (the closing square bracket). As with the Find elements, there are no spaces between these elements. You still want green frog, not green frog. See also:.
Replace text in quotes with bold:. Replace excess spaces:. Find and replace any number of spaces:. Change the number of spaces after a period: Links last checked June 2011. Hi KT One other thing Make sure that when you select the font color etc.
For the replace action, that your cursor is in the ‘Replace with’ field. In my testing just now, I inadvertently left it in the ‘Find what’ field and of course, no replacements could be made as there was nothing in the document with the font/size I wanted! An easy error to make as I think Word wants to apply the font formatting to the ‘Find what’ field by default and you have to explicitly put your cursor in the ‘Replace with’ field to make it happen. –Rhonda October 6, 2011 at 10:00 am. Actually both of these worked: Find: ( ).( ) Replace: ^& (means replace with contents that was Found and Find: (.) Replace: 1 I actually think (since I’m sure I tried the first one before I posted the first time (I tried EVERYTHING!) that I may have put the “formatting” on the Find instead of the Replace as Rhonda said.:- Can’t think of why else it wouldn’t have worked. Oh well.:-D I’m all set now!
Thank goodness and thanks for all your help!! KT, Virginia USA October 7, 2011 at 8:00 am. Hello, Thanks you for such a useful page. I am trying to clean up the text from an old book which I got from the Gutenberg Project. It has hundreds of sets of square brackets containing numbers, which are there for references. I wanted to delete them, but couldn’t figure out how to do this.
I simply cut the symbols from line 6 of your tutorial and replaced each set of brackets containing numerals with nothing. It worked wonderfully. Thanks once again. Regards from Australia. John Tyler March 22, 2012 at 5:35 pm. This worked well for me in Word 2007. I have uncovered a strange glitch though.
I’m using this as a work around to help Excel maintain source formating when using data for a print merge. Since excel won’t keep the original formatting I am using this to put brackets around blank records adding a red font and changing the characters to hidden on unfinished data. This allows meto print the work in progress without the holes from all the unfinished data. The problem is that word puts a section break in between the brackets which signal a new page so there are empty spaces were the unfinished cells are. If I change the section break to continuous then I lose the data merged into my header.
Is there something about the formula that I can change so it won’t do this? Diane June 26, 2013 at 9:20 pm. Hi Pat I’m not sure that you can automatically. That said, I’m a beginner at wild card searching, so perhaps there’s a way. However, if you use that ‘Find’ string above and DO NOT replace, you can find each instance and then manually change it to red text between the brackets. And once you’ve changed it to red, do another ‘find’ for the next one, and this time select the text you want to be red then press F4 (which applies the last action — i.e. Applies the same colour you applied to the first one).
NOTE: If you do any other action — like delete something — then F4 will delete, and you’ll have to undo and manually apply the red again. One way to avoid F4 doing weird things is to select the red text, press Ctrl+Shift+C (this copies the formatting), then on the next ‘find’ select that text, then press Ctrl+Shift+V (this pastes the copied formatting to the selected text).
–Rhonda March 27, 2014 at 6:47 am. Hi again Pat One other way to do this follow the instructions in the blog post for changing the whole string to blue (but in your case, choose red).
Then run two more wild card find/replace passes to change the colour of the brackets back to normal. In the first pass, just put ( ) in the ‘find’, and 1 in the ‘replace’ field. While in the ‘replace’ field, click No Formatting to remove the blue from the first run, then click Format Font and choose Automatic as the font colour. Make sure ‘Use wildcards’ is selected. Click Replace.
If it does what you want, then click Replace All. In the second pass, you do the same as the first, except you put ( ) in the ‘find’. Everything else stays the same as for the first pass.
–Rhonda March 27, 2014 at 6:53 am. Is there any way I can get this exact functionality within Excel 2013? I have used it successfully in Word 2013 (thanks to this helpful article), but Excel seems to take my “replace” text as a literal string and will not parse my expression properly. I have several cells that contain 1, 2, 3 and so on. I want to format the text inside each cell to be a specific font, size, weight and color.
For example: Cell one: 1 Cell two: 2 Cell three: 3 In Word I use the replace functionality to find this: ( )(.)( ) and then replace it with this: 1 2 3 and with special font formatting. This works well. In Excel I use the replace functionality to find this:. and then replace it with this: 1 2 3 and with special font formatting. This does not work.
Instead, each cell ends up looking like this: Cell one: 1 2 3 Cell two: 1 2 3 Cell three: 1 2 3 Excel is parsing the “replace” expression as a literal string. I’ve tried different ways of trying to get the desired result, but keep coming up short. I did some research and everything I find points to Word being able to use expressions like “ 1 2 3” but nothing mentions Excel. Thank you kindly. December 11, 2014 at 12:40 am. Hi Looks like, between you, you know lots about ‘find and replace’ and wildcards!
I’m working on proofreading several hundred documents, most of which need a couple of repetitive changes made to the format of numbered lists, but as I’m new to wildcards, I can’t work out what I need to enter to achieve what I want. Issue 1: the current format is like this: 1) 2) etc, and I need it to be: (1) (2) Issue 2: the current format is this: (1) (2) etc, and I need it to be: 1. If you can help me out on this, I would be very grateful: it would cut down the time I spend on each document considerably. Best wishes Michael July 14, 2015 at 2:09 am. Hi Michael If the authors have used auto numbering, as I suspect they may have because it’s easy, then find and replace — whether with wildcards or not — won’t help you much. Advice: Make a copy of one of your documents BEFORE you do the process below. That way you don’t mess up your original until you have figured out what to do and dealt with the ‘gotchas’, and decided whether you REALLY want to do this Your best bet is to select a range of numbered items, then click the drop-down arrow to the immediate right of the 123 icon on the Home tab, then select the format you need.
If you need a format other than that listed, select ‘Define New Number Format’ and add/delete parentheses around the number. Be aware that you could totally mess up the numbering sequences!!
And may have to start each new set of numbers at ‘1’ again. The auto numbering in Word may not behave as you want it to. At which point you’ll ask yourself WHY you want to change the punctuation surrounding the numbers and decide it’s just not worth it. If it doesn’t change meaning, do you REALLY need to spend time and energy (and frustration) on this? –Rhonda July 14, 2015 at 9:56 am. Is there a replace command that can delete the entire sentence with a “specific” word “INSIDE” the sentence, not just at the beginning nor end of the sentence?
Yadi yadi ya DIR yadi yadi ya. ^13.:.:.^13 Does not work for me. From my understanding, the following are the descriptions of the codes used: ^13 = paragraph tab.:. = any and all characters = sentence selection = the word “inside” the sentence that is searched for DIR So, the command should execute a search and select the beginning paragraph tab in a sentence with the word DIR inside it and then continue to select the rest of the sentence up to the next paragraph tab. At this point I can leave my “replace with” empty and click select all to perform on the entire document. Stuart Stegner December 20, 2015 at 2:06 pm.
Hi Stuart I’m not sure where you got your list of expressions from, but I don’t think.:. and are used in Microsoft Word. These articles describe what expressions ARE used in Word: and Now to your question I got this to work, but only partially. You would have to check each item found because it may get some you didn’t want, and miss others. One that worked was: (^13)(.)(DIR)(.)(.:;!? ) but this gets more than a single sentence where DIR occurs. Note that I’ve included the main punctuation marks that typically end a sentence.
Another that worked more precisely was (. ) as it selected just a sentence containing DIR and the preceding period and space (there’s a space after the period in the Find string). You would have to add a period in the Replace to replace the one found. Although (^13)(.)(DIR)(.)(^13) worked too, you would have to ensure that every sentence where DIR occurred was in its own paragraph. These may help, but won’t cover every situation. Perhaps run some of these first, then do a final Find for any DIR outliers.
December 22, 2015 at 7:32 am. Hi Stephanie The easiest way to do that would be a standard Find/Replace with the opening bracket as your first Find (Replace with nothing) followed by Replace All, and the closing bracket as your next Find (again, Replace with nothing and do Replace All). I think that would be quicker and easier than figuring out a wildcard routine for it. However, be aware that removing brackets may well change the meaning of the content, so I’d only do ‘Replace’ not ‘Replace All’ and check each instance to see if the brackets needed to be replaced with something else, such as an en or em dash. –Rhonda May 4, 2016 at 6:14 am.
Rhonda, congratulations for your excellent support to this page. I guess, it’s a very useful resource for many of us needing that kind of help using Word Search & Replace. My question, if you still there, or any other user who knows the solution, is how to find and replace bulleted and numbered list formatting. My work here needs just delete them at once.
There is no such thing at “Format” nor “Special” button, but only Section, Fields, I have a very big text with too many bulleted lists with no character in it, among normal text. November 29, 2016 at 8:07 pm. Hi Gab The easiest way to do this is to select all text with the style, then clear the formatting. If you used the bullet icon from the menu to apply the bulletting, then the style is ‘List Paragraph’; if you have your own style for bulletting, then you need to know that style’s name. The steps below assume ‘List Paragraph’ is the style.
On the Home tab, go to the Styles group. Click the tiny arrow in the right corner of that group — this opens the Styles panel. Hover over the ‘List Paragraph’ style’s name until you see the drop-down arrow for it. Click that arrow. Click the ‘Select All xx Instances’ option.
Back on the Styles panel, go to the top and click ‘Clear All’ — this takes the formatting of the style back to ‘Normal’. November 30, 2016 at 6:19 am. Hi Hatta I got this to work, but only after doing three find and replace passes:.
On the Home tab, select a highlight colour (this is important!), then follow the steps above until Step 8. At Step 8, select Highlight. Run the find/replace. This will highlight the entire string, including the square brackets. (NOTE: If you don’t select a highlight colour before you start, no highlighting will be applied.). On the home tab, select No color as the highlight colour (important!!). If it’s not already open, open the Find and Replace dialog, make sure Use Wildcards is turned on, then leave just ( ) in the Find What field.
In the Replace field, you only need 1. Then click the No Formatting button at the bottom of the Find and Replace dialog – there should be no formatting info below the Replace With field.
Run the find/replace – this will clear the highlighting from the opening square bracket. Repeat step 2 above, changing to in the Find What field. –Rhonda June 11, 2017 at 6:48 am. Hi, I apologize if I confused you. I did not want to highlight the contents in the brackets, what I meant was, select all the contents in it.
I have a 300 pages doc that containts hundreds of sample, what I need to do is make all the words within the brackets to italic. So I need to go from sample to sampleitalic (sorry I don’t know how to make it italic here). When I tried your formula above, it included the bracket when I hit find, so that means it’ll change the brackets to italics too, I need it to stay normal. Am I making sense? I am so sorry for my bad english.
![]()
Hatta June 11, 2017 at 5:59 pm. Rhonda and Gab, Thank you so much! Tested and they both worked. Gab’s solution was a better fit for me because I had manually altered some of the timestamps and those were left intact.
Rhonda’s solution worked but still stripped the last bit from the altered timestamps so I was left with 00 instead of 00:00. Will just have to remember to make sure all formats are the same when I use it in the future. Thanks again to you both! One last – what if I had a string of text before the timestamp that I wanted to be left intact, would replace be able to work? inaudible 00:00:00 to inaudible 00:00 Emily June 21, 2017 at 3:37 am. Hi Jorge I’m not clear on what you want to do.
Do you want the first words of EVERY paragraph up to the first comma capitalised? For example:. para 1 – HOWEVER, the xxxx. para 2 – SHE PURCHASED APPLES, oranges, and pears Or do you want to find the first capped words in a paragraph, up to the first comma, and format them in some way (e.g. Italics, bold)? For example:. para 1 – They arranged for the TRUCK to pick up the furniture, rugs, and lamps.
(where TRUCK would remained capped and in italics or other styling). para 2 – In Step 3, SELECT the option, then click OK. (where SELECT would remain capped and in italics or other styling) Or something else? –Rhonda July 29, 2017 at 5:58 am. Someone else may have a clever idea on doing this in one pass, but the only thing I can come up with at the moment is a solution that involves a couple of passes.
First pass is your initial wildcard find/replace string (in my testing I applied the ‘Intense Emphasis’ character style, but obviously you’d apply your special style). Second pass is to find the paragraph marks with that new style and change them back to the underlying paragraph style — Find: (^13) with the applied style name also selected; Replace: 1 with the ‘Default paragraph font’ style selected. Third pass is to do the same, but for the commas — Find: (,) with the applied style name also selected; Replace: 1 with the ‘Default paragraph font’ style selected. NOTE: I couldn’t get your find/replace string to work with a hyphenated capped name (e.g. SMITH-JONES, Sam), so you might have to find those separately, if you have any.
July 29, 2017 at 3:16 pm. Hi Priscilla/Dee This is similar to the issue that Jorge had the other day (see comments above yours. And the solution is similar too — you’ll need to do three passes. Hi Rhonda, Thank you so much for your help last time. That did the trick!
I apologize for not writing back sooner. I have another question though, I tried to replicate the formula (if you call it that) but for defined terms, all of which are enclosed in ” “. So the formula is ”(.) ” but unfortunately it selects the quotations as well. “Define” – when I use the formula above via replace and apply a bold formatting on it, it includes the ” “, is it possible to only have the contents between ” ” in bold and leave the ” ” as is? I hope I am making sense. Hatta August 9, 2017 at 12:37 pm.
Hi Personalize951 Like you, I couldn’t get anything to work either. Could only get as far as selecting the number, dot, space and first letter. There’s no indicator in Word of the end of a line (except where it’s also the end of a paragraph — either hard or soft line break), so I can’t see any pattern to this.
Without a pattern, it’s almost impossible to get a ‘find’ happening. Can I ask why you’re trying to do this? Once you’ve selected the line, what do you then need to do with it? There may be another approach if I know what your purpose is. Also, consider asking your question on the Microsoft Word forums on Microsoft’s website — they have some very clever people who help others, and who may be able to help you.
–Rhonda August 15, 2017 at 6:36 am. I am trying to replace lots of “/any text /” with (any text ) in Word 2010. While /(.) / will find the text, (^&) as a replacement returns (/any text /), and using (^& ) or (.
) in the replace field both result in “group number out of range”. I thought I might be able to search and replace the (/any text /) but it is time consuming as I have to search for (/ and replace it with something like & and / ) with $ but these characters already exist in the document, so I am looking for a simpler solution? Why is the replace not working?
Don Faison March 17, 2018 at 4:00 am. Hi Don I went about it a different way. Using wildcards, try this: Find: ( /)(.)( /) Replace: 2 Do NOT do a Replace All until you’ve tested it on a copy of your document and are satisfied it doesn’t mess up something you didn’t expect. The difference between mine and yours is that I enclosed the escape characters and the slashes inside parentheses; this made them elements 1 and 3.
You want to get rid of them, so the replace has just element 2 (the (.) part of the find being replaced with itself). –Rhonda March 17, 2018 at 7:54 am. I have a bit of a strange one. I’d post it in a separate thread as it has absolutely nothing to do with this one, but I couldn’t find where to post a new question and I couldn’t see a thread with a similar topic either. I have a few documents – about 50 pages each.
I need to insert some words around the center of each page. Is there any way to find the center of a page in Word? The document already has text and I’m not looking to align the text vertically, but I’d like to maybe insert something (a blank line, ideally, or text) into the center of each page so that I could either use find and replace on those blank lines or just manually go through the pages and find the blank lines. Anyone have an idea of how I might be able to do this? A macro would be great, but any other solution would be greatly appreciated. I’m using Word 2010 if that has any bearing. Emily July 21, 2018 at 7:29 pm.
Hi Emily I don’t know of any way to do this, and I’m not clear on why you want to do this. If you want the reader to see this, you could perhaps use a watermark, but watermarks live in the headers, not on the main page itself. I’m also not sure that ‘centre on the page’ has a lot of meaning — printer drivers as well as page dimensions and layout mean that something like a blank line or a series of characters (e.g. QQQ) in the ‘centre’ can change position depending on those factors. –Rhonda July 22, 2018 at 7:53 am. Thanks for getting back to me!
Let me give more details. This is for a transcription project where I need to put in timestamps at the top and middle of each page. By “center of page,” I mean the center of the page as seen in print layout view in MS Word. I was hoping there may be some function to find the center of the page.
I was thinking maybe a macro that maybe would utilize a line count or line numbers, find the median, insert a blank line which I could then easily find and timestamp. The only thing is I don’t want line numbers in the document, so if it was a macro, it would put in line numbers, find the median one, input a blank line there, remove line numbers. Gosh, this sounds complicated now that I’ve written it out! That’s just my theory of how this could be done and I don’t have enough VBA knowledge to construct a macro to do that, but any other suggestions of how this could be done would be great. Emily July 22, 2018 at 8:07 am. Sorry to send as answer too many days after your question, but I was very busy at that time and could not give the proper attention.
I’m not an expert in Visual Basic and I had to search to try to find a solution for your question. Also, the below solution may not be the best one and it could be improved. Thank you Gab Arito! No worries about the time – I’ve been looking for an answer for this on and off for about 4 months, so to me, this was very quick!:-) It does work, and as you indicated, on some documents it is adding a bunch of extra lines at the end, but I can work with that. Thank you so much! Best regards, Emily On Sat, Jul 28, 2018 at 10:11 PM, CyberText Newsletter wrote: Gab Arito commented: “Hi, Emily. Sorry to send as answer too many days after your question, but I was very busy at that time and could not give the proper attention.
I’m not an expert in Visual Basic and I had to search to try to find a solution for your question. Also,” July 29, 2018 at 5:18 am.
Hi cgaits I didn’t use your macro, just the strings in the original post. It found text surrounded by square brackets WITHIN a table cell, but not across table cells (i.e. Opening in one table cell and closing in another cell). It also didn’t find any matches with an opening square bracket in a table cell and its closing partner outside the table. So, I got the same results as you.
I tried using PerfectIt (it has a function to find unclosed quote marks brackets), and it found the text after an opened (but unclosed) square bracket in a table cell, but not text with a closed (but unopened) bracket in another cell. I’ve reached the limits of my knowledge with this one! –Rhonda September 29, 2018 at 6:05 am. I figured it out. A little extra work, but it’s working like a charm. OWordApp.Selection.Find.Execute(“ “, ““, ) Do While oWordApp.Selection.Find.Found = True If oWordApp.Selection.Font.Color Word.WdColor.wdColorRed Then Do While InStr(oWordApp.Selection.Text, “”). Hi beckyloup I’m on vacation at the moment, so don’t have time to figure out more than this for now (there’s probably a more elegant way to do it): Do a wildcard find/replace, with as the find (with Font: Italic selected for the find’s formatting), and replace with 1.
This gets you closer, but it will only find single whole words that are italicised, NOT strings of italicised text, such as paragraphs. And when it replaces, the square brackets around the text are also in italics. If you want those as normal text, you’ll need to do another (standard) find/replace for the italic opening square bracket and replace it with an opening square bracket without formatting, and then again for the closing square bracket. If you don’t have hundreds to do, you might be better off just looking for the italics and adding the square brackets manually. –Rhonda November 7, 2018 at 4:32 am.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |