Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the values, but not the formulas in a range
I'm trying to clear the values, but not the formulas in this range?
Range("E3:F3, E5:F5").ClearContents Is it possible? Cheers Aidy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the values, but not the formulas in a range
Hi
You can use On Error Resume Next Range("E3:F3, E5:F5").SpecialCells(xlCellTypeConstants).ClearCon tents On Error GoTo 0 -- Regards Ron de Bruin http://www.rondebruin.nl "aidy" wrote in message ups.com... I'm trying to clear the values, but not the formulas in this range? Range("E3:F3, E5:F5").ClearContents Is it possible? Cheers Aidy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the values, but not the formulas in a range
If a formula evaluates to a value, you can't clear the value without
eliminating the formula. You can hide the value by making the font color match the background, if that is what you want to do. Or just hide the cells. -- - K Dales "aidy" wrote: I'm trying to clear the values, but not the formulas in this range? Range("E3:F3, E5:F5").ClearContents Is it possible? Cheers Aidy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
clear the values, but not the formulas in a range
Just realized you probably have a mix (unknown to you) of cells with formulas
and values. Try Range("E3:F3, E5:F5").SpecialCells(xlCellTypeConstants).ClearCon tents. -- - K Dales "aidy" wrote: I'm trying to clear the values, but not the formulas in this range? Range("E3:F3, E5:F5").ClearContents Is it possible? Cheers Aidy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clear values but keep formulas? | Excel Discussion (Misc queries) | |||
How do I clear data values wthout losing the formulas? | Excel Worksheet Functions | |||
Automatically clear values from a range of selected cells | Excel Discussion (Misc queries) | |||
Select range -- convert formulas to values | Excel Programming | |||
How do I clear a worksheet of values, but leave formulas intact? | Excel Worksheet Functions |