Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete zeros in light yellow cells

I am working with a state mandated Excel template and need to write a macro
that will delete the contents of cells that first are light yellow
(.ColorIndex = 36) and second are not textual. I can write the necessary
macro in Lotus 123 but Excel is a whole different world.

The Excel template has merged cells, formulation in different colored cells
(which must remain unchanged) and 3,000 rows with columns to AJ in the
largest worksheet. Other worksheets in the file have fewer lines and fewer
columns. Each row has different merged cells. I need a repeating macro to
evaluate each cell individually and to delete only those light yellow cells
(or light yellow merged cells) that are not text and which evaluate to zero.

All help is greatly appreciated.

Thanks, Claude


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Delete zeros in light yellow cells

One way:

Public Sub ClearLightYellowNumbers()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
With cell
If IsNumeric(.Value) Then _
If .Value = 0 Then _
If .Interior.ColorIndex = 36 Then _
.MergeArea.ClearContents
End With
Next cell
End Sub


In article ,
"Claude" wrote:

I am working with a state mandated Excel template and need to write a macro
that will delete the contents of cells that first are light yellow
(.ColorIndex = 36) and second are not textual. I can write the necessary
macro in Lotus 123 but Excel is a whole different world.

The Excel template has merged cells, formulation in different colored cells
(which must remain unchanged) and 3,000 rows with columns to AJ in the
largest worksheet. Other worksheets in the file have fewer lines and fewer
columns. Each row has different merged cells. I need a repeating macro to
evaluate each cell individually and to delete only those light yellow cells
(or light yellow merged cells) that are not text and which evaluate to zero.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Delete zeros in light yellow cells

Check out this webpage
http://www.cpearson.com/excel/colors.htm

Cheers
Nigel

"Claude" wrote in message
...
I am working with a state mandated Excel template and need to write a

macro
that will delete the contents of cells that first are light yellow
(.ColorIndex = 36) and second are not textual. I can write the necessary
macro in Lotus 123 but Excel is a whole different world.

The Excel template has merged cells, formulation in different colored

cells
(which must remain unchanged) and 3,000 rows with columns to AJ in the
largest worksheet. Other worksheets in the file have fewer lines and fewer
columns. Each row has different merged cells. I need a repeating macro to
evaluate each cell individually and to delete only those light yellow

cells
(or light yellow merged cells) that are not text and which evaluate to

zero.

All help is greatly appreciated.

Thanks, Claude






----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
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
Excel 2007 noncontiguous cell highlight color=light,light blue. How do I make it darker, or like Excel 2003 ( I'm extremely shade blind-PLZ HELP !! ) DCJM New Users to Excel 1 July 28th 11 12:49 PM
Excel 2007 noncontiguous cell highlight color=light,light blue. How do I make it darker, or like Excel 2003 ( I'm extremely shade blind-PLZ HELP !! ) DCJM Excel Discussion (Misc queries) 1 July 27th 11 10:42 PM
How to replace the background color of all cells from light green to light blue? Claudia d'Amato Excel Discussion (Misc queries) 1 November 14th 08 07:09 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
How do I Delete Sheet when it won't light up in the Edit menu? CFP Excel Worksheet Functions 2 December 2nd 05 01:41 AM


All times are GMT +1. The time now is 08:17 PM.

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

About Us

"It's about Microsoft Excel"