Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old November 14th 08, 06:54 PM posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2008
Posts: 26
Default How to replace the background color of all cells from light green to light blue?

Assume I have a worksheet where some (but not all !!) cells have a background color of light green.

How can I change at once (!) the background color of all those cells to light blue?

All other cells should remain unchanged.

Claudia


  #2   Report Post  
Old November 14th 08, 07:09 PM posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2007
Posts: 11,501
Default How to replace the background color of all cells from light green

Hi,

Right click your sheet tab, view code and paste this ij and run it

Sub swapem()
For Each c In ActiveSheet.UsedRange
If c.Interior.ColorIndex = 35 Then
c.Interior.ColorIndex = 41
End If
Next
End Sub

Mike

"Claudia d'Amato" wrote:

Assume I have a worksheet where some (but not all !!) cells have a background color of light green.

How can I change at once (!) the background color of all those cells to light blue?

All other cells should remain unchanged.

Claudia




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I neen a chart background to represent traffic light colors... OraPronobis Charts and Charting in Excel 2 September 28th 08 03:05 PM
Selected cells show up as very light gray? Can I darken? Louise Excel Discussion (Misc queries) 1 September 11th 08 08:25 PM
Default Row Hi-light Color Intensity WTS Excel Discussion (Misc queries) 0 September 3rd 08 04:31 PM
I need to add a blinking red, yellow and green light to an excel Becke Wolf Excel Discussion (Misc queries) 1 April 30th 07 11:32 PM
sheet background color suddenly changed to light green from normal Dan Excel Discussion (Misc queries) 0 March 28th 07 03:22 PM


All times are GMT +1. The time now is 10:34 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017