Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the ranges to clean up don't change, you may want to use Insert|Name|define
and create a couple of range names that you can use: with worksheets("sheetnamehere") .range("ResetToZero").value = 0 .range("ResetToEmpty").clearcontents end with Eugene_Elder wrote: How can I loop through every cell in every worksheet and if the cell color is Yellow or Light Yellow reset the cell value depending on its type to "" or 0 ? I have barely started the code and more questions are coming then answers. Private Sub cmdClearAllDataCells_Click() Dim ws As Worksheet Dim oCell As Range If MsgBox("Clear ALL quote data?", vbYesNo + vbQuestion) = vbNo _ Then Exit Sub For Each ws In ActiveWorkbook.Worksheets For Each oCell In Selection ' Next Next End If End Sub -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trying to loop through all shapes on multiple worksheets and change color | Excel Programming | |||
change fill color of a range of cells based on color of a cell? | Excel Programming | |||
Loop criteria based on cell value and color | Excel Programming | |||
Empty cells in For Loop | Excel Programming | |||
Loop to change cell color based on found value? | Excel Programming |