Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 01-29-2023, 07:26 AM
Marcia's Avatar
Marcia Marcia is offline Select fill colors in a workbook, change to another color Windows 11 Select fill colors in a workbook, change to another color Office 2021
Expert
Select fill colors in a workbook, change to another color
 
Join Date: May 2018
Location: Philippines
Posts: 553
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Here's the code:
Code:
Sub blah()
With Application
  .ReplaceFormat.Clear
  .FindFormat.Clear
  .FindFormat.Interior.Color = RGB(220, 230, 241)
  .FindFormat.Locked = True
  .FindFormat.FormulaHidden = False
  .ReplaceFormat.Interior.Color = RGB(253, 233, 217)
  Cells.Replace What:="", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=True, ReplaceFormat:=True, FormulaVersion:=xlReplaceFormula2
  .ReplaceFormat.Clear
  .FindFormat.Clear
End With
End Sub
Thank you for the code p45cal and the screenshot of the Find/workbook setting. Had there been no picture, I wouldn't have understood your next instructions about "within worbkbook."
The code perfectly works in all the sheets except from some random cells that had not changed colors. I'm trying to find the cause of the different result.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Select and Change Color with Keyboard Shortcuts? abrogard Word 12 06-04-2022 12:18 PM
Allow Cell Background Fill/Text Color Change while Protected Sheets are Grouped RaudelJr Excel 5 04-18-2017 11:11 PM
Select fill colors in a workbook, change to another color Change accent theme color used as shape fill (not RGBs) preetidb PowerPoint 4 12-30-2013 03:22 PM
Select fill colors in a workbook, change to another color Select a range in one one workbook while working in other workbook Slow&Steady Excel 1 02-21-2010 03:34 AM
Select fill colors in a workbook, change to another color Change Automatic Fill Color Leanne PowerPoint 1 11-04-2009 08:34 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:41 PM.


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