| Windows 7: Find and Replace |
25 Dec 2010
|
#1 | | Windows 7 x64 RC1, Vista Ultimate, XP Pro AZ |
Find and Replace Excel 2007 - I would like to do a Find and Replace a word and when I do it changes the entire cell by taking the words which have color and truning them black and changing my fonts to one size. How can I just Find and Replace just one word in a cell? Is there anyway I can do a find and have all the words highlighted like when you do a find on the Internet? | My System Specs |
| OS Windows 7 x64 RC1, Vista Ultimate, XP Pro CPU AMD 955 Memory 4 gigs - 1333 Graphics Card 5750 Monitor(s) Displays i-inc 28" Screen Resolution 1920x1200 Hard Drives 2 SATA2 750 GB - 1 SATA2 1TB - 1 SATA3 1TB - 1 USB3 2TB - 1 USB3 500 GB, SSD 60 GB Internet Speed 7 Megs |
25 Dec 2010
|
#2 | | Windows 7 Professional 32bit Sp1 |

Quote: Originally Posted by lostsoul62 Excel 2007 - I would like to do a Find and Replace a word and when I do it changes the entire cell by taking the words which have color and truning them black and changing my fonts to one size. How can I just Find and Replace just one word in a cell? Is there anyway I can do a find and have all the words highlighted like when you do a find on the Internet? I'm not sure if you can highlight the word but you can change the color of the font, shade the cell etc. Find & select, replace, format, text & fill. | My System Specs | | System Manufacturer/Model Number Dell Vostro 3500 (Laptop) OS Windows 7 Professional 32bit Sp1 CPU Intel Core i5 CPU M 460 @ 2.53GHz Motherboard Dell Memory Crucial 4GB DDR3 RAM Graphics Card Intel HD Graphics, NVIDIA GeForce 310M Sound Card nVidia High Definition Audio, IDT Monitor(s) Displays 17" Dell (external), 32" Vizio HDTV Screen Resolution 1366 x 768 Keyboard The Virtually Indestructible Keyboard Mouse Microsoft Wireless Notebook Presenter Mouse 8000 Hard Drives 500 GB Western Digital Scorpio Black 7200RPM
Two- 320 GB Seagates @ 7200RPM in external enclosures (eSata & USB), One- 1TB Seagate Expansion Drive Internet Speed Sucks Other Info Microsoft Security Essentials, SuperAntiSpyware Pro, MalwareBytes AntiMalware (on demand) |
25 Dec 2010
|
#3 | | Windows 7 SP1, Home Premium, 64-bit |
Not clear from your explanation what you are trying to do. Find and replace has some options as you see when you go the that window.
More generally, have you looked into "conditional formatting"??
I use it to turn certain cells red or green, depending on whether the value in those cells is greater or less than a particular value found elsewhere in the worksheet. I think it can control font and font size as well, but I use it only for colors.
I'd assume you could force a cell to have a 24 point New Times Roman bolded font with a yellow background if the first word in the cell begins with J, etc if that is what you wanted. Conditional formatting has a lot of control. You make a series of "rules" and if what is in the cell matches the rule, the formatting changes. If not, it doesn't. | My System Specs | | System Manufacturer/Model Number Ignatz Special; 4 speed manual gearbox; factory air conditioning; one of one OS Windows 7 SP1, Home Premium, 64-bit CPU Intel Sandy Bridge i5-2500, not overclocked Motherboard Gigabyte H67A-UD3H-B3, full ATX Memory 4 GB Crucial DDR3-1333 Graphics Card none; graphics are integrated on CPU Sound Card onboard: Realtek ALC892; external: USB Behringer UF0-202 Monitor(s) Displays NEC 90GX2-BK 19" LCD Screen Resolution 800 x 640 Keyboard Leopold Tenkeyless with Cherry Blue switches, USB Mouse Logitech or Microsoft optical wired; either USB or PS 2 PSU Seasonic SS-560KM, modular Case Antec Solo II Cooling CPU: Scythe Big Shuriken; Case: Scythe Slipstream 800 & 500 Hard Drives System: Intel 320 Series SSD, 80 GB;
Data: Samsung Spinpoint 103SJ, 1 TB;
Backup: WD Caviar Green WD15EADS-00P8B0, 1.5TB Other Info Power consumption of this system, including monitor: 68 watts at idle; 144 watts at full load |
26 Dec 2010
|
#4 | | Windows 7 x64 RC1, Vista Ultimate, XP Pro AZ |
The word and not the cell I don't want to turn the cell into anything I want to turn a word in the cell to something different. In my case I want to turn a thousand words in a thousand cells which will be one word per cell that I am try to change ONLY. Is there anyway I can do this? | My System Specs | | OS Windows 7 x64 RC1, Vista Ultimate, XP Pro CPU AMD 955 Memory 4 gigs - 1333 Graphics Card 5750 Monitor(s) Displays i-inc 28" Screen Resolution 1920x1200 Hard Drives 2 SATA2 750 GB - 1 SATA2 1TB - 1 SATA3 1TB - 1 USB3 2TB - 1 USB3 500 GB, SSD 60 GB Internet Speed 7 Megs |
06 Jan 2011
|
#5 | | Windows 7 Enterprise x64 North Somerset, UK |
By chance, I came across a possible answer to this difficult problem (it's at Superscripts in Find and Replace (Microsoft Excel)).
That specific example talks about making one character in a cell superscript, but the macro they give could be modified to alter just one word. The limitation would be that the word would need to be the same, and in the same place, in every cell. The macro they give is: Sub DoConvert()
Dim c As Range
For Each c In Selection.Cells
If c.Value = "yd2" Then
c.Characters(3, 1).Font.Superscript = True
End If
Next
End Sub
Say you had an Excel worksheet with thousands of cells, about a thousand of which contain the string "SevenForums is great". If you wanted to change the word "great" to bold, making those cells say "SevenForums is great", you could run this macro: Sub DoConvert()
Dim c As Range
For Each c In Selection.Cells
If c.Value = "SevenForums is great" Then
c.Characters(16, 5).Font.Bold = True
End If
Next
End Sub
The (16, 5) bit tells the macro to go to the 16th character in the string, and to do the conversion on 5 characters. I've tried it and it does work - hopefully it will solve your problem. If you need any help with tweaking it, let us know | My System Specs | | System Manufacturer/Model Number Custom OS Windows 7 Enterprise x64 CPU Intel i7 920 Motherboard Asus P6T Deluxe v2 Memory 6 GB Graphics Card nVidia GTX260 + nVidia 3D Sound Card Onboard Monitor(s) Displays Samsung SyncMaster 2233RZ Screen Resolution 1680 x 1050 PSU 700W Hard Drives 1 x 64GB SSD primary
2 x 1 TB (mirrored) Other Info Edimax 802.11n Wireless PCI Card
Netgear DG834G router |
06 Jan 2011
|
#6 | | Several, including Windows 7 x64 Ultimate |
| My System Specs | | OS Several, including Windows 7 x64 Ultimate |
07 Oct 2011
|
#7 | | |
I had the same problem and the solution presented here and elsewhere didn't quite solve what I looking for (the above solution only matches on the whole text string, as opposed to a substring and the other only formatted a substring in one cell), so I combined the two:
Sub Bold_substring()
Dim c As Range
Dim Start As Long
Dim TargetWord As String
For Each c In Selection.Cells
Start = 0
TargetWord = "substring I'm looking for"
Do
Start = InStr(Start + 1, c.Text, TargetWord)
If Start < 1 Then Exit Do
With c.Characters(Start, Len(TargetWord)).Font
If IsNull(FontBold) = False Then .Bold = True
End With
Loop
Next
End Sub | My System Specs | | Find and Replace problems? All times are GMT -5. The time now is 08:43 AM. | |