Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
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 !! ) | New Users to Excel | |||
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 !! ) | Excel Discussion (Misc queries) | |||
How to replace the background color of all cells from light green to light blue? | Excel Discussion (Misc queries) | |||
I need to add a blinking red, yellow and green light to an excel | Excel Discussion (Misc queries) | |||
How do I Delete Sheet when it won't light up in the Edit menu? | Excel Worksheet Functions |